From 0445a5ed6f1e3952bbab8e710bf8c1ba121d5d42 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Ouellet Date: Tue, 20 Nov 2018 23:26:20 -0500 Subject: [PATCH] Improve git command detection Reduce false positives by requiring a space afterwards, and support (optionally bare) 'g' alias. --- zshrc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc.sh b/zshrc.sh index 4c1c9b3e..ce1589f5 100644 --- a/zshrc.sh +++ b/zshrc.sh @@ -3,7 +3,7 @@ # see documentation at http://linux.die.net/man/1/zshexpn preexec_update_git_vars() { case "$2" in - git*|hub*|gh*|stg*) + 'git '*|'hub '*|'gh '*|'stg '*|'g '*|'g') __EXECUTED_GIT_COMMAND=1 ;; esac