diff --git a/lib/git.zsh b/lib/git.zsh index b9069ff1..f7eccb81 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -165,13 +165,13 @@ function git_prompt_status() { if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" fi - if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then + if $(echo "$INDEX" | grep '^## [^ ]\+ .*ahead' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS" fi - if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then + if $(echo "$INDEX" | grep '^## [^ ]\+ .*behind' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS" fi - if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then + if $(echo "$INDEX" | grep '^## [^ ]\+ .*diverged' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS" fi echo $STATUS