From b43b93c53bcc528ca66b62a69cf726cc3e12549b Mon Sep 17 00:00:00 2001 From: Kieran Klukas Date: Wed, 10 Jun 2026 16:12:34 -0400 Subject: [PATCH] bug: fix gitstatusd staged bug --- impure.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/impure.zsh b/impure.zsh index 335c089..344a085 100644 --- a/impure.zsh +++ b/impure.zsh @@ -657,7 +657,7 @@ prompt_impure_gitstatus_init() { setopt no_xtrace builtin source "$gitstatus_plugin" 2>/dev/null } || return 1 - gitstatus_start -s 1 -u 1 -t 5 IMPURE 2>/dev/null || return 1 + gitstatus_start -s -1 -u -1 -t 5 IMPURE 2>/dev/null || return 1 prompt_impure_gitstatus_inited=1 return 0 } @@ -684,10 +684,11 @@ prompt_impure_gitstatus_query() { # Staging summary: (+added ~modified -deleted) local staging="" - (( VCS_STATUS_NUM_STAGED_NEW )) && staging+="+${VCS_STATUS_NUM_STAGED_NEW}" + (( VCS_STATUS_NUM_STAGED_NEW )) && staging+="+${VCS_STATUS_NUM_STAGED_NEW} " local modified=$(( VCS_STATUS_NUM_STAGED - VCS_STATUS_NUM_STAGED_NEW - VCS_STATUS_NUM_STAGED_DELETED )) - (( modified > 0 )) && staging+="~${modified}" - (( VCS_STATUS_NUM_STAGED_DELETED )) && staging+="-${VCS_STATUS_NUM_STAGED_DELETED}" + (( modified > 0 )) && staging+="~${modified} " + (( VCS_STATUS_NUM_STAGED_DELETED )) && staging+="-${VCS_STATUS_NUM_STAGED_DELETED} " + staging=${staging% } # trim trailing space typeset -g prompt_impure_git_staging="${staging:-}" # Arrows: ahead/behind counts. -- 2.51.2