diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index 7684f431b..4ea450ddf 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -301,7 +301,7 @@ function fish_git_prompt --description "Prompt function for Git" # Renames and copies in porcelain -z output have an extra NUL-delimited # field for the source path. Filter to entries starting with a valid # two-char status code followed by a space to skip those bare paths. - set -l stat (command git -c core.fsmonitor= status --porcelain -z $opt | string split0 | string match -r '^[ MADRCU?!]{2} .*') + set -l stat (command git -c core.fsmonitor= status --porcelain -z $opt | string split0 | string match -r '^[ MADRCTU?!]{2} .*') set dirtystate (string match -qr '^.[ACDMRTU]' -- $stat; and echo 1) if test -n "$sha" @@ -427,7 +427,7 @@ function __fish_git_prompt_informative_status # Renames and copies in porcelain -z output have an extra NUL-delimited # field for the source path. Filter to entries starting with a valid # two-char status code followed by a space to skip those bare paths. - set -l stats (string sub -l 2 (git -c core.fsmonitor= status --porcelain -z $untr | string split0 | string match -r '^[ MADRCU?!]{2} .*')) + set -l stats (string sub -l 2 (git -c core.fsmonitor= status --porcelain -z $untr | string split0 | string match -r '^[ MADRCTU?!]{2} .*')) set -l invalidstate (string match -r '^UU' $stats | count) set -l stagedstate (string match -r '^[ACDMRT].' $stats | count) set -l dirtystate (string match -r '^.[ACDMRT]' $stats | count)