Fix git staged/dirty counters

This commit is contained in:
Ilan Cosman 2021-03-25 21:28:58 -07:00
parent 977b5b2662
commit 781fab9904

View File

@ -62,8 +62,8 @@ function _tide_item_git
if test "$isInsideWorkTree" = true if test "$isInsideWorkTree" = true
set -l gitInfo (git status --porcelain) set -l gitInfo (git status --porcelain)
set staged (string match --regex '^[ADMR] ' $gitInfo | count) || set -e staged set staged (string match --regex '^[ADMR].' $gitInfo | count) || set -e staged
set dirty (string match --regex '^ [ADMR]' $gitInfo | count) || set -e dirty set dirty (string match --regex '^.[ADMR]' $gitInfo | count) || set -e dirty
set untracked (string match --regex '^\?\?' $gitInfo | count) || set -e untracked set untracked (string match --regex '^\?\?' $gitInfo | count) || set -e untracked
set conflicted (string match --regex '^UU' $gitInfo | count) || set -e conflicted set conflicted (string match --regex '^UU' $gitInfo | count) || set -e conflicted
set stash (git stash list | count) || set -e stash set stash (git stash list | count) || set -e stash