abort instant prompt if wizard needs to run on startup

pull/735/head
romkatv 5 years ago
parent 7e6abbb891
commit 574754eaf6

@ -6333,8 +6333,23 @@ _p9k_precmd_impl() {
__p9k_configured=1 __p9k_configured=1
if [[ -z "${parameters[(I)POWERLEVEL9K_*~(POWERLEVEL9K_MODE|POWERLEVEL9K_CONFIG_FILE)]}" ]]; then if [[ -z "${parameters[(I)POWERLEVEL9K_*~(POWERLEVEL9K_MODE|POWERLEVEL9K_CONFIG_FILE)]}" ]]; then
_p9k_can_configure -q _p9k_can_configure -q
case $? in local -i ret=$?
0) if (( ret == 2 && $+__p9k_instant_prompt_active )); then
_p9k_clear_instant_prompt
unset __p9k_instant_prompt_active
_p9k_delete_instant_prompt
zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null
() {
local key
while true; do
[[ -t 2 ]]
read -t0 -k key || break
done 2>/dev/null
}
_p9k_can_configure -q
ret=$?
fi
if (( ret == 0 )); then
( (
source "$__p9k_root_dir"/internal/wizard.zsh source "$__p9k_root_dir"/internal/wizard.zsh
) )
@ -6345,13 +6360,7 @@ _p9k_precmd_impl() {
_p9k__force_must_init=1 _p9k__force_must_init=1
_p9k_must_init _p9k_must_init
fi fi
;; fi
2)
_p9k_delete_instant_prompt
zf_rm -f -- $__p9k_dump_file{,.zwc} 2>/dev/null
instant_prompt_disabled=1
;;
esac
fi fi
fi fi
_p9k_init _p9k_init
@ -7985,7 +7994,7 @@ _p9k_init() {
_p9k_init_vcs _p9k_init_vcs
if (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT )); then if (( _p9k__instant_prompt_disabled )); then
unset __p9k_instant_prompt_erased unset __p9k_instant_prompt_erased
_p9k_delete_instant_prompt _p9k_delete_instant_prompt
_p9k_dumped_instant_prompt_sigs=() _p9k_dumped_instant_prompt_sigs=()

Loading…
Cancel
Save