From ffe5a7c57c534ed2aeb56623bb0549b2d6c21a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 13 Apr 2018 17:53:24 +0200 Subject: [PATCH] Fix associative array 'STASHED' key Also optimised `if` statement to make it more idiomatic. --- lib/git.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index aa2ca2af2..0bafc903a 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -179,8 +179,8 @@ function git_prompt_status() { return 1 fi - if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then - statuses_seen['STASHED']=1 + if command git rev-parse --verify refs/stash &>/dev/null; then + statuses_seen[STASHED]=1 fi local status_lines=("${(@f)${status_text}}");