# -*- mode: sh -*- # -*- mode: sh -*- # zshrc/75_vcsinfo # # Set up vcs_info subsystem # # Copyright © 1994–2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # # Source repository: git://git.madduck.net/etc/zsh.git # # 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 # 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[%.5r]' zstyle ':vcs_info:git*:*' actionformats '%c%u|%s@%a:%b@%.5i' # 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