pull upstream changes from gitstatus

pull/70/head
romkatv 6 years ago
parent eb8aaecf62
commit b451b7a758

@ -296,8 +296,11 @@ function gitstatus_start() {
function _gitstatus_cleanup_${ZSH_SUBSHELL}_${daemon_pid}() {
emulate -L zsh
setopt err_return no_unset
local -i daemon_pid=${${(%):-%N}#_gitstatus_cleanup_${ZSH_SUBSHELL}_}
[[ $daemon_pid -gt 0 ]] && kill -- -$daemon_pid &>/dev/null || true
local fname=${(%):-%N}
local prefix=_gitstatus_cleanup_${ZSH_SUBSHELL}_
[[ $fname == ${prefix}* ]] || return 0
local -i daemon_pid=${fname#$prefix}
kill -- -$daemon_pid &>/dev/null || true
}
add-zsh-hook zshexit _gitstatus_cleanup_${ZSH_SUBSHELL}_${daemon_pid}
@ -399,6 +402,8 @@ function gitstatus_stop() {
add-zsh-hook -d zshexit $cleanup_func
unfunction $cleanup_func
fi
return 0
}
# Usage: gitstatus_check NAME.

Loading…
Cancel
Save