vcs_info fallback for oldish zsh

This commit is contained in:
Loic Nageleisen 2012-09-05 19:21:26 +02:00
parent 301d1e796b
commit dc15a4c6e4

View file

@ -1,9 +1,15 @@
autoload -U is-at-least
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git hg zstyle ':vcs_info:*' enable git hg
zstyle ':vcs_info:*' stagedstr "%F{red}±%f" vcs_format="%F{green}%S%f%F{blue}%b%f%F{yellow}%r%f"
zstyle ':vcs_info:*' unstagedstr "%F{yellow}≠%f" if is-at-least 4.3.11; then
zstyle ':vcs_info:*' check-for-changes true echo "foo"
zstyle ':vcs_info:*' formats "%c%u %F{green}%S%f%F{blue}%b%f%F{yellow}%r%f" zstyle ':vcs_info:*' stagedstr "%F{red}±%f"
zstyle ':vcs_info:*' actionformats "%F{red}%a%f %c%u %F{green}%S%f%F{blue}%b%f%F{yellow}%r%f" zstyle ':vcs_info:*' unstagedstr "%F{yellow}≠%f"
zstyle ':vcs_info:*' check-for-changes true
vcs_format="%c%u $vcs_format"
fi
zstyle ':vcs_info:*' formats "$vcs_format"
zstyle ':vcs_info:*' actionformats "%F{red}%a%f $vcs_format"
# vim: ft=zsh # vim: ft=zsh