From 15778f7a34fcbd620a4f6fa2faf84b2d567e152f Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann Date: Wed, 20 Nov 2013 13:31:37 +0000 Subject: [PATCH] Tweaking for compatibility with old ZSH 4.3.11 --- modules/prompt/functions/prompt_giddie_setup | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/prompt/functions/prompt_giddie_setup b/modules/prompt/functions/prompt_giddie_setup index 172c8759..d9217781 100644 --- a/modules/prompt/functions/prompt_giddie_setup +++ b/modules/prompt/functions/prompt_giddie_setup @@ -15,10 +15,10 @@ # # Hooks for vcs_info -function +vi-no_vcs_precmd() { +function +vi-set_novcs_prompt_symbol() { _prompt_giddie_symbol=')' } -function +vi-vcs_precmd() { +function +vi-set_vcs_prompt_symbol() { _prompt_giddie_symbol='±' } function +vi-git_precmd() { @@ -58,9 +58,11 @@ function prompt_giddie_setup { zstyle ':vcs_info:*' unstagedstr '%F{green}!%f' # Add vcs_info hooks - zstyle ':vcs_info:*+no-vcs:*' hooks no_vcs_precmd - zstyle ':vcs_info:git*+set-message:*' hooks vcs_precmd git_precmd - zstyle ':vcs_info:*+set-message:*' hooks vcs_precmd + # NOTE: Prior to ZSH 4.3.12, there are no static hooks, no vcs_info_hookadd + # function, and no 'no-vcs' hook. + zstyle ':vcs_info:*+start-up:*' hooks set_novcs_prompt_symbol + zstyle ':vcs_info:git*+set-message:*' hooks set_vcs_prompt_symbol git_precmd + zstyle ':vcs_info:*+set-message:*' hooks set_vcs_prompt_symbol # Define prompts. PROMPT='%(?..%F{red}%B-> [%?]%b%f