From 5397f7b8b8aced00c026ea4fe8c2f7d8706d98ad Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Sun, 1 Dec 2019 17:35:31 +0100 Subject: [PATCH] Account for function being invoked asynchronously --- pure.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pure.zsh b/pure.zsh index 840207a9..215a4fd4 100644 --- a/pure.zsh +++ b/pure.zsh @@ -271,8 +271,7 @@ prompt_pure_async_vcs_info() { # and stash information via misc (%m). zstyle ':vcs_info:git*' formats '%b' '%R' '%a' '%m' zstyle ':vcs_info:git*' actionformats '%b' '%R' '%a' '%m' - zstyle -t ":prompt:pure:git:stash" show - if [[ $? == 0 ]]; then + if [[ $1 == 0 ]]; then zstyle ':vcs_info:git*+set-message:*' hooks git-stash fi @@ -381,7 +380,8 @@ prompt_pure_async_tasks() { fi unset MATCH MBEGIN MEND - async_job "prompt_pure" prompt_pure_async_vcs_info + zstyle -t ":prompt:pure:git:stash" show + async_job "prompt_pure" prompt_pure_async_vcs_info $? # Only perform tasks inside a Git working tree. [[ -n $prompt_pure_vcs_info[top] ]] || return