]> git.donarmstrong.com Git - zsh.git/commitdiff
fix vcsifno
authorDon Armstrong <don@donarmstrong.com>
Thu, 27 Dec 2012 22:36:23 +0000 (14:36 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 27 Dec 2012 22:36:23 +0000 (14:36 -0800)
.zsh/zshrc/75_vcsinfo

index 5592fc1d910d1396337ea230ec36bcc6c73f2273..e4339fddf68d6537573f044b65329b54578dac81 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: sh -*-
 # zshrc/75_vcsinfo
 #
 # Set up vcs_info subsystem
 # 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