mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
git prompt: Remove a useless use of math
This commit is contained in:
@@ -428,10 +428,7 @@ function __fish_git_prompt_informative_status
|
|||||||
|
|
||||||
set -l info
|
set -l info
|
||||||
|
|
||||||
# If `math` fails for some reason, assume the state is clean - it's the simpler path
|
if test "$dirtystate$invalidstate$stagedstate$untrackedfiles$stashstate" = 00000
|
||||||
set -l state (math $dirtystate + $invalidstate + $stagedstate + $untrackedfiles + $stashstate 2>/dev/null)
|
|
||||||
if test -z "$state"
|
|
||||||
or test "$state" = 0
|
|
||||||
if test -n "$___fish_git_prompt_char_cleanstate"
|
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
|
set info $___fish_git_prompt_color_cleanstate$___fish_git_prompt_char_cleanstate$___fish_git_prompt_color_cleanstate_done
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user