diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-05-01 23:37:16 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-05-01 23:37:16 +0300 |
commit | 41d741fb1f74c8ab5d556f043d351e94f162384a (patch) | |
tree | e9bcbbc501d656187709224b2036b681715392e6 /gitstatus | |
parent | 0a8fc003bdf510c67dfe8555f30e810c34c1b1d3 (diff) |
pull upstream changes from gitstatus
Diffstat (limited to 'gitstatus')
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index d90a3866..44b0e7a3 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -256,9 +256,9 @@ function gitstatus_start() { } zle -F $resp_fd _gitstatus_process_response_${name} - [[ ${GITSTATUS_ENABLE_LOGGING:-0} == 1 ]] && - log_file=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.log.XXXXXXXXXX) || - log_file=/dev/null + typeset -g GITSTATUS_DAEMON_LOG_${name}=/dev/null + [[ ${GITSTATUS_ENABLE_LOGGING:-0} != 1 ]] || + typeset GITSTATUS_DAEMON_LOG_${name}=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.log.XXXXXXXXXX) local -i threads=${GITSTATUS_NUM_THREADS:-0} (( threads > 0)) || { @@ -277,7 +277,7 @@ function gitstatus_start() { --num-threads=$threads \ --dirty-max-index-size=$max_dirty echo -nE $'bye\x1f0\x1e' - " <&$req_fd >&$resp_fd 2>$log_file 3<$lock_file &! + " <&$req_fd >&$resp_fd 2>$GITSTATUS_DAEMON_LOG_${name} 3<$lock_file &! daemon_pid=$! command rm -f $lock_file @@ -297,7 +297,6 @@ function gitstatus_start() { } gitstatus_start_impl && { - typeset -g GITSTATUS_DAEMON_LOG_${name}=$log_file typeset -gi GITSTATUS_DAEMON_PID_${name}=$daemon_pid typeset -giH _GITSTATUS_REQ_FD_${name}=$req_fd typeset -giH _GITSTATUS_RESP_FD_${name}=$resp_fd |