1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

work around a bug in zsh that skips precmd hooks after trapped SIGINT if there is just one of them

This commit is contained in:
romkatv 2019-11-08 13:57:20 +01:00
parent 1382fa7e81
commit e4aa4588dd

View File

@ -5646,6 +5646,8 @@ else
typeset -gri __p9k_dumps_enabled=0 typeset -gri __p9k_dumps_enabled=0
fi fi
_p9k_do_nothing() { true; }
prompt_powerlevel9k_setup() { prompt_powerlevel9k_setup() {
(( __p9k_enabled )) && return (( __p9k_enabled )) && return
@ -5660,6 +5662,7 @@ prompt_powerlevel9k_setup() {
prompt_powerlevel9k_teardown prompt_powerlevel9k_teardown
__p9k_enabled=1 __p9k_enabled=1
add-zsh-hook preexec _p9k_preexec add-zsh-hook preexec _p9k_preexec
add-zsh-hook precmd _p9k_do_nothing
add-zsh-hook precmd _p9k_precmd add-zsh-hook precmd _p9k_precmd
} }