mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-27 00:39:11 +01:00
Fix checkmark for clean repo in bureau theme
This commit is contained in:
parent
c78277fd8b
commit
e2bf7cb3df
@ -23,32 +23,36 @@ bureau_git_branch () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bureau_git_status () {
|
bureau_git_status () {
|
||||||
_INDEX=$(command git status --porcelain -b 2> /dev/null)
|
|
||||||
_STATUS=""
|
_STATUS=""
|
||||||
if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
|
if [[ $(command git status --short 2> /dev/null) != "" ]]; then
|
||||||
|
_INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||||
|
if $(echo "$_INDEX" | command grep '^[AMRD]. ' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep '^.[MTD] ' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep '^UU ' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
|
||||||
fi
|
fi
|
||||||
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
|
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | grep '^## .*ahead' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep '^## .*ahead' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | grep '^## .*behind' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep '^## .*behind' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
|
||||||
fi
|
fi
|
||||||
if $(echo "$_INDEX" | grep '^## .*diverged' &> /dev/null); then
|
if $(echo "$_INDEX" | command grep '^## .*diverged' &> /dev/null); then
|
||||||
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
|
fi
|
||||||
|
|
||||||
echo $_STATUS
|
echo $_STATUS
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user