diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-11-21 23:12:51 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-11-21 23:12:51 +0300 |
commit | 2d32241c20571f594719015fccd254e03badb0f1 (patch) | |
tree | 638984907b81820aab2042c80aea815e290646a7 | |
parent | fdb90994c9ba7863b97621ab75f6e2bd7b9dc530 (diff) |
pull upstream changes from gitstatus
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index 842a34d5..5c6a9e39 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -160,13 +160,11 @@ function gitstatus_query() { local client_pid_var=_GITSTATUS_CLIENT_PID_${name} [[ ${(P)client_pid_var} == $$ ]] - if [[ -z ${GIT_DIR:-} ]]; then + [[ -z ${GIT_DIR:-} ]] && { [[ $dir == /* ]] || dir=${(%):-%/}/$dir - elif [[ $GIT_DIR == /* ]]; then - dir=:$GIT_DIR - else - dir=:${(%):-%/}/$GIT_DIR - fi + } || { + [[ $GIT_DIR == /* ]] && dir=:$GIT_DIR || dir=:${(%):-%/}/$GIT_DIR + } local req_fd_var=_GITSTATUS_REQ_FD_${name} local -i req_fd=${(P)req_fd_var} |