fish_git_prompt: Count untracked files from the repository root

We already do this for the non-informative (non-counting) version.

Fixes #6086.
This commit is contained in:
Fabian Homborg
2020-05-28 20:49:01 +02:00
parent 4e5220a4e1
commit ba116f1d3b

View File

@@ -545,7 +545,7 @@ 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 | count)
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"