diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index 6f9657d1f..6ee0a8e5c 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -533,11 +533,11 @@ function __fish_git_prompt_informative_status set -l x (count $stagedFiles) set -l invalidstate (count (string match -r "U" -- $stagedFiles)) set -l stagedstate (math $x - $invalidstate) - set -l untrackedfiles (command git ls-files --others --exclude-standard | wc -l | string trim) + set -l untrackedfiles (command git ls-files --others --exclude-standard | count) set -l stashstate 0 set -l stashfile "$argv[1]/logs/refs/stash" if set -q __fish_git_prompt_showstashstate; and test -e "$stashfile" - set stashstate (wc -l $stashfile | string match -r '\d+') + set stashstate (count < $stashfile) end set -l info