1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-12 08:10:07 +00:00

move _p9k_do_nothing to the front of precmd_functions

This commit is contained in:
romkatv 2019-11-12 11:03:49 +01:00
parent 1387763f27
commit d92c45c6bd

View file

@ -4254,6 +4254,9 @@ _p9k_precmd_impl() {
if [[ $precmd_functions[-1] != _p9k_precmd && $precmd_functions[(I)_p9k_precmd] != 0 ]]; then if [[ $precmd_functions[-1] != _p9k_precmd && $precmd_functions[(I)_p9k_precmd] != 0 ]]; then
precmd_functions=(${(@)precmd_functions:#_p9k_precmd} _p9k_precmd) precmd_functions=(${(@)precmd_functions:#_p9k_precmd} _p9k_precmd)
fi fi
if [[ $precmd_functions[1] != _p9k_do_nothing && $precmd_functions[(I)_p9k_do_nothing] != 0 ]]; then
precmd_functions=(_p9k_do_nothing ${(@)precmd_functions:#_p9k_do_nothing})
fi
} }
_p9k_trapint() { _p9k_trapint() {
@ -5684,8 +5687,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 typeset -ga precmd_functions=(_p9k_do_nothing $precmd_functions _p9k_precmd)
add-zsh-hook precmd _p9k_precmd
} }
prompt_powerlevel9k_teardown() { prompt_powerlevel9k_teardown() {