diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-04-30 15:17:55 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-04-30 15:17:55 +0300 |
commit | f90bf482a5d69dfd13f5999d8d7124128ab68724 (patch) | |
tree | 74350111aaecb44f42a017191ddc5bf4e14e09ff /gitstatus/gitstatus.plugin.zsh | |
parent | 182f0f71627a2f8b84b80ae5c320b061c987ed22 (diff) |
pull upstream changes from gitstatus
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index cc8f15e7..f5b48b71 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -119,7 +119,7 @@ function gitstatus_query() { (( OPTIND == ARGC )) || { echo "usage: gitstatus_query [OPTION]... NAME" >&2; return 1 } local name=${*[$OPTIND]} - [[ -v GITSTATUS_DAEMON_PID_${name} ]] + [[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]] # Verify that gitstatus_query is running in the same process that ran gitstatus_start. local client_pid_var=_GITSTATUS_CLIENT_PID_${name} @@ -224,7 +224,7 @@ function gitstatus_start() { (( OPTIND == ARGC )) || { echo "usage: gitstatus_start [OPTION]... NAME" >&2; return 1 } local name=${*[$OPTIND]} - [[ ! -v GITSTATUS_DAEMON_PID_${name} ]] || return 0 + [[ -z ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]] || return 0 local os && os=$(uname -s) && [[ -n $os ]] local arch && arch=$(uname -m) && [[ -n $arch ]] @@ -319,5 +319,5 @@ function gitstatus_start() { # If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero. function gitstatus_check() { local name=$1 - [[ -v GITSTATUS_DAEMON_PID_${name} ]] + [[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]] } |