mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Merge e99bc0da3c into caa15548c1
This commit is contained in:
commit
3300f82fd5
1 changed files with 4 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ function git_prompt_long_sha() {
|
|||
|
||||
# Get the status of the working tree
|
||||
git_prompt_status() {
|
||||
INDEX=$(git status --porcelain 2> /dev/null)
|
||||
INDEX=$(git status --porcelain 2> /dev/null) || return
|
||||
STATUS=""
|
||||
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||
|
|
@ -66,7 +66,9 @@ git_prompt_status() {
|
|||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
||||
fi
|
||||
echo $STATUS
|
||||
if [[ "$STATUS" != "" ]]; then
|
||||
echo "$ZSH_THEME_GIT_STATUS_BEFORE$STATUS$ZSH_THEME_GIT_STATUS_AFTER"
|
||||
fi
|
||||
}
|
||||
|
||||
#compare the provided version of git to the version installed and on path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue