diff options
-rw-r--r-- | 11_Prompts.zsh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/11_Prompts.zsh b/11_Prompts.zsh index 3ea857a..a0a2feb 100644 --- a/11_Prompts.zsh +++ b/11_Prompts.zsh @@ -115,10 +115,11 @@ precmd () errorsize=4 ## GIT TRACKING ## - GITBRANCH=$(git branch 2>&- | grep -E '^\* ' | cut -c3-) - if [ "$GITBRANCH" != "" ] + unset GITBRANCH + if [ "$GITCHECK" != "" ] then - if [ "$GITCHECK" != "" ] + GITBRANCH=$(git branch 2>&- | grep -E '^\* ' | cut -c3-) + if [ "$GITBRANCH" != "" ] then preprint "Checking git status..." _git_status=$(git-runstatus 2>&- | grep -E '^# ([[:alpha:]]+ )+(but not|to be)( [[:alpha:]]+)+:$') |