migrate to top level vcsinfo support

This commit is contained in:
Ryan Phillips 2010-10-19 12:56:31 -07:00
commit 538801a4db

25
lib/vcsinfo.zsh Normal file
View file

@ -0,0 +1,25 @@
# Use the following within your prompt
# ${vcs_info_msg_0_}
#
# The style of vcs_info can be tweaked within a theme by modifying the output
# using zstyle.
#
# http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#IDX2133
#
typeset -ga precmd_functions
autoload -Uz vcs_info
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' formats "$ZSH_THEME_GIT_PROMPT_PREFIX%b%u%F$ZSH_THEME_GIT_PROMPT_SUFFIX"
zstyle ':vcs_info:git:*' unstagedstr "$ZSH_THEME_GIT_PROMPT_DIRTY"
zsh_vcsinfo_precmd() {
vcs_info
}
vcs_prompt_info() {
echo "${vcs_info_msg_0_}"
}
precmd_functions+='zsh_vcsinfo_precmd'