mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
pull upstream changes from gitstatus
This commit is contained in:
parent
3fd0e63776
commit
27b415f7f5
1 changed files with 4 additions and 4 deletions
|
@ -233,13 +233,13 @@ function gitstatus_start() {
|
||||||
IFS='' read -r -d $'\x1e' -u $resp_fd -t $timeout reply
|
IFS='' read -r -d $'\x1e' -u $resp_fd -t $timeout reply
|
||||||
[[ $reply == $'hello\x1f0' ]]
|
[[ $reply == $'hello\x1f0' ]]
|
||||||
|
|
||||||
function _gitstatus_cleanup_${daemon_pid}() {
|
function _gitstatus_cleanup_${ZSH_SUBSHELL}_${daemon_pid}() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
setopt err_return no_unset
|
setopt err_return no_unset
|
||||||
local -i daemon_pid=${${(%)${:-%N}}#_gitstatus_cleanup_}
|
local -i daemon_pid=${${(%)${:-%N}}#_gitstatus_cleanup_${ZSH_SUBSHELL}_}
|
||||||
kill -- -$daemon_pid &>/dev/null || true
|
[[ $daemon_pid -gt 0 ]] && kill -- -$daemon_pid &>/dev/null
|
||||||
}
|
}
|
||||||
add-zsh-hook zshexit _gitstatus_cleanup_${daemon_pid}
|
add-zsh-hook zshexit _gitstatus_cleanup_${ZSH_SUBSHELL}_${daemon_pid}
|
||||||
}
|
}
|
||||||
|
|
||||||
start && {
|
start && {
|
||||||
|
|
Loading…
Reference in a new issue