Fix associative array 'STASHED' key

Also optimised `if` statement to make it more idiomatic.
This commit is contained in:
Marc Cornellà 2018-04-13 17:53:24 +02:00 committed by GitHub
commit ffe5a7c57c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}}");