From 95faf814b5c8c6e7094be2a9f47dca49b1040fab Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 6 Aug 2012 12:29:43 -0400 Subject: [PATCH] [Fix #230] Check the expanded command in steeef preexec --- modules/prompt/functions/prompt_steeef_setup | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/prompt/functions/prompt_steeef_setup b/modules/prompt/functions/prompt_steeef_setup index 541c7ce..e650c9a 100644 --- a/modules/prompt/functions/prompt_steeef_setup +++ b/modules/prompt/functions/prompt_steeef_setup @@ -32,14 +32,9 @@ function prompt_steeef_precmd { } function prompt_steeef_preexec { - case "$(history $HISTCMD)" in - (*git*) - __PROMPT_STEEEF_VCS_UPDATE=1 - ;; - (*svn*) - __PROMPT_STEEEF_VCS_UPDATE=1 - ;; - esac + if [[ "${2[(w)1]}" == (git|svn) ]]; then + __PROMPT_STEEEF_VCS_UPDATE=1 + fi } function prompt_steeef_chpwd {