4 # Set up vcs_info subsystem
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
9 # Source repository: git://git.madduck.net/etc/zsh.git
12 # see zsh-betacontrib(1)
15 zstyle ':vcs_info:*' get-revision true
16 zstyle ':vcs_info:*' check-for-changes true
17 zstyle ':vcs_info:*' formats '%u%c|%s:%b'
18 zstyle ':vcs_info:*' actionformats '%c%u|%s@%a:%b'
19 zstyle ':vcs_info:*' branchformat '%b@%r'
20 zstyle ':vcs_info:*' unstagedstr "%{$fg_no_bold[red]%}"
21 zstyle ':vcs_info:*' stagedstr "%{$fg_no_bold[yellow]%}"
22 zstyle ':vcs_info:*' enable hg git bzr svn cvs
24 # vcs-specific formatting...
25 zstyle ':vcs_info:hg*:*' hgrevformat "%r"
26 #zstyle ':vcs_info:fossil:*' fsrevformat '%.5h'
27 # Silly git doesn't honor branchformat
28 zstyle ':vcs_info:git*:*' formats '%c%u|%s@%a:%b@%.5i'
29 zstyle ':vcs_info:git*:*' actionformats '%c%u|%s@%a:%b@%.5i'
31 # now use the blasted colors!
33 RPROMPT='%{$fg_no_bold[green]%}${vcs_info_msg_0_}%{$reset_color%}'
35 #this enables vcs_info
36 precmd_functions+=vcs_info