From 33c5cd5808df18bc55c219a200912e0c1ebd253b Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Mon, 6 May 2024 19:15:42 +0200 Subject: [PATCH] git prompt: Remove a useless use of math --- share/functions/fish_git_prompt.fish | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index c8b55547f..866c0ef39 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -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