From dc15a4c6e4c9ba036f1ef145a2c4ffc92d1cfc88 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Wed, 5 Sep 2012 19:21:26 +0200 Subject: [PATCH] vcs_info fallback for oldish zsh --- zsh/prompt_vcs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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