mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-16 23:12:45 +08:00
git prompt: Remove a useless use of math
This commit is contained in:
parent
2a121ef1aa
commit
33c5cd5808
|
@ -428,10 +428,7 @@ function __fish_git_prompt_informative_status
|
|||
|
||||
set -l info
|
||||
|
||||
# If `math` fails for some reason, assume the state is clean - it's the simpler path
|
||||
set -l state (math $dirtystate + $invalidstate + $stagedstate + $untrackedfiles + $stashstate 2>/dev/null)
|
||||
if test -z "$state"
|
||||
or test "$state" = 0
|
||||
if test "$dirtystate$invalidstate$stagedstate$untrackedfiles$stashstate" = 00000
|
||||
if test -n "$___fish_git_prompt_char_cleanstate"
|
||||
set info $___fish_git_prompt_color_cleanstate$___fish_git_prompt_char_cleanstate$___fish_git_prompt_color_cleanstate_done
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user