mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Merge 7ed2ff87ab into 8efdbef778
This commit is contained in:
commit
ead02693a3
1 changed files with 42 additions and 40 deletions
|
|
@ -76,8 +76,9 @@ function git_prompt_long_sha() {
|
|||
|
||||
# Get the status of the working tree
|
||||
git_prompt_status() {
|
||||
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||
STATUS=""
|
||||
if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then
|
||||
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||
if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||
fi
|
||||
|
|
@ -118,6 +119,7 @@ git_prompt_status() {
|
|||
if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS"
|
||||
fi
|
||||
fi
|
||||
echo $STATUS
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue