aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zsh/zshrc.org15
1 files changed, 13 insertions, 2 deletions
diff --git a/zsh/zshrc.org b/zsh/zshrc.org
index 27af335..f89ab2d 100644
--- a/zsh/zshrc.org
+++ b/zsh/zshrc.org
@@ -189,14 +189,14 @@ Autoload any ZSH function from =$HOME/.zsh/functions=.
colors
#+end_src
- Setup VCS info.
+ Setup VCS info. The =formats= option supports two arguments, they are the format strings for the =vcs_info_message_0_= and =vcs_info_message_1_=. The latter is used to set the title for the current wezterm (or other terminal) tab.
#+begin_src sh
add-zsh-hook precmd vcs_info
zstyle ':vcs_info:*' actionformats '%u%c%B%F{1}%a%f%%b %F{3}%s%f:%F{5}%r%f:%F{4}%b%f'
zstyle ':vcs_info:*' enable bzr git hg svn
- zstyle ':vcs_info:*' formats '%u%c%F{3}%s%f:%F{5}%r%f:%F{4}%b%f'
+ zstyle ':vcs_info:*' formats '%u%c%F{3}%s%f:%F{5}%r%f:%F{4}%b%f' '%r'
zstyle ':vcs_info:*' nvcsformats ''
zstyle ':vcs_info:bzr:*' branchformat '%b'
zstyle ':vcs_info:git:*' check-for-changes 1
@@ -211,6 +211,17 @@ Autoload any ZSH function from =$HOME/.zsh/functions=.
RPROMPT='${vcs_info_msg_0_}'
#+end_src
+ Set the current tab's title (for wezterm at least), to the current project directory. This is set above with the =%r= specifier.
+
+ #+begin_src sh
+ function set_vcs_title()
+ {
+ printf "\\e]0;${vcs_info_msg_1_}\\a"
+ }
+
+ add-zsh-hook precmd set_vcs_title
+ #+end_src
+
* Other configurations
Other setups might also make ZSH files, these should all be loaded.