Commit 27fff272 authored by Yuichi Tanikawa's avatar Yuichi Tanikawa Committed by Marc Cornellà
Browse files

Fix git_prompt_status() not showing ahead/behind/diverged status correctly (#5388)

parent 71201ffd
...@@ -165,13 +165,13 @@ function git_prompt_status() { ...@@ -165,13 +165,13 @@ function git_prompt_status() {
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
fi fi
if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then if $(echo "$INDEX" | grep '^## [^ ]\+ .*ahead' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS"
fi fi
if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then if $(echo "$INDEX" | grep '^## [^ ]\+ .*behind' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS"
fi fi
if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then if $(echo "$INDEX" | grep '^## [^ ]\+ .*diverged' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS"
fi fi
echo $STATUS echo $STATUS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment