mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
avoided unnecessary git call from git_prompt_status
This commit is contained in:
parent
96e4e5dd03
commit
0bbae0c320
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ function git_prompt_long_sha() {
|
|||
|
||||
# Get the status of the working tree
|
||||
git_prompt_status() {
|
||||
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||
INDEX=$(command git status --porcelain -b 2> /dev/null) || return 1
|
||||
STATUS=""
|
||||
if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue