From 781fab990435be3a2d048d65d60ef040f2801e61 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Thu, 25 Mar 2021 21:28:58 -0700 Subject: [PATCH] Fix git staged/dirty counters --- functions/_tide_item_git.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/_tide_item_git.fish b/functions/_tide_item_git.fish index 5bb723b..e11cb25 100644 --- a/functions/_tide_item_git.fish +++ b/functions/_tide_item_git.fish @@ -62,8 +62,8 @@ function _tide_item_git if test "$isInsideWorkTree" = true set -l gitInfo (git status --porcelain) - set staged (string match --regex '^[ADMR] ' $gitInfo | count) || set -e staged - set dirty (string match --regex '^ [ADMR]' $gitInfo | count) || set -e dirty + set staged (string match --regex '^[ADMR].' $gitInfo | count) || set -e staged + set dirty (string match --regex '^.[ADMR]' $gitInfo | count) || set -e dirty set untracked (string match --regex '^\?\?' $gitInfo | count) || set -e untracked set conflicted (string match --regex '^UU' $gitInfo | count) || set -e conflicted set stash (git stash list | count) || set -e stash