diff --git a/zsh/prompt_vcs b/zsh/prompt_vcs index 2ae099c..d89072f 100644 --- a/zsh/prompt_vcs +++ b/zsh/prompt_vcs @@ -1,9 +1,15 @@ +autoload -U is-at-least autoload -Uz vcs_info zstyle ':vcs_info:*' enable git hg -zstyle ':vcs_info:*' stagedstr "%F{red}±%f" -zstyle ':vcs_info:*' unstagedstr "%F{yellow}≠%f" -zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:*' formats "%c%u %F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f" -zstyle ':vcs_info:*' actionformats "%F{red}%a%f %c%u %F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f" +vcs_format="%F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f" +if is-at-least 4.3.11; then + echo "foo" + zstyle ':vcs_info:*' stagedstr "%F{red}±%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