From 0de5acbc59a1fab85167d2be0a6a725a0185972e Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 27 Dec 2012 14:36:23 -0800 Subject: [PATCH] fix vcsifno --- .zsh/zshrc/75_vcsinfo | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.zsh/zshrc/75_vcsinfo b/.zsh/zshrc/75_vcsinfo index 5592fc1..e4339fd 100644 --- a/.zsh/zshrc/75_vcsinfo +++ b/.zsh/zshrc/75_vcsinfo @@ -1,3 +1,4 @@ +# -*- mode: sh -*- # zshrc/75_vcsinfo # # Set up vcs_info subsystem @@ -11,16 +12,25 @@ # see zsh-betacontrib(1) autoload -Uz vcs_info +zstyle ':vcs_info:*' get-revision true +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' formats '%u%c|%s:%b' +zstyle ':vcs_info:*' actionformats '%c%u|%s@%a:%b' +zstyle ':vcs_info:*' branchformat '%b@%r' +zstyle ':vcs_info:*' unstagedstr "%{$fg_no_bold[red]%}" +zstyle ':vcs_info:*' stagedstr "%{$fg_no_bold[yellow]%}" +zstyle ':vcs_info:*' enable hg git bzr svn cvs -zstyle ':vcs_info:*' actionformats \ - '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' -zstyle ':vcs_info:*' formats \ - '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f ' -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' +# vcs-specific formatting... +zstyle ':vcs_info:hg*:*' hgrevformat "%r" +#zstyle ':vcs_info:fossil:*' fsrevformat '%.5h' +# Silly git doesn't honor branchformat +zstyle ':vcs_info:git*:*' formats '%c%u|%s@%a:%b@%.5i' +zstyle ':vcs_info:git*:*' actionformats '%c%u|%s@%a:%b@%.5i' -#PS1=’%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}’"%f%# ’ - -zstyle ':vcs_info:*' disable cdv darcs mtn svk p4 tla +# now use the blasted colors! +setopt PROMPT_SUBST +RPROMPT='%{$fg_no_bold[green]%}${vcs_info_msg_0_}%{$reset_color%}' #this enables vcs_info -#precmd_functions+=vcs_info +precmd_functions+=vcs_info -- 2.39.2