mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:17:12 +08:00
parent
33c5cd5808
commit
9320fb52bb
|
@ -299,9 +299,9 @@ function fish_git_prompt --description "Prompt function for Git"
|
||||||
# Ignored files are omitted by default
|
# Ignored files are omitted by default
|
||||||
set -l stat (command git -c core.fsmonitor= status --porcelain -z $opt | string split0)
|
set -l stat (command git -c core.fsmonitor= status --porcelain -z $opt | string split0)
|
||||||
|
|
||||||
set dirtystate (string match -qr '^.[ACDMRT]' -- $stat; and echo 1)
|
set dirtystate (string match -qr '^.[ACDMRTU]' -- $stat; and echo 1)
|
||||||
if test -n "$sha"
|
if test -n "$sha"
|
||||||
set stagedstate (string match -qr '^[ACDMRT].' -- $stat; and echo 1)
|
set stagedstate (string match -qr '^[ACDMRTU].' -- $stat; and echo 1)
|
||||||
else
|
else
|
||||||
set invalidstate 1
|
set invalidstate 1
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user