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

set DISABLE_UPDATE_PROMPT=true when activating instant prompt

This is an Oh My Zsh option that makes it update without asking for
confirmation. In practice, when instant prompt is active, OMZ doesn't
wait for the user confirmation and automatically updates.

By setting DISABLE_UPDATE_PROMPT=true we get rid of the spurious
question from the console output without changing the behavior of OMZ
updater.
This commit is contained in:
romkatv 2020-01-07 10:55:43 +01:00
parent 784fea72b5
commit d77bc5fa46

View file

@ -3905,7 +3905,7 @@ _p9k_set_instant_prompt() {
RPROMPT=$saved_rprompt
}
typeset -gri __p9k_instant_prompt_version=13
typeset -gri __p9k_instant_prompt_version=14
_p9k_dump_instant_prompt() {
local user=${(%):-%n}
@ -4131,6 +4131,7 @@ _p9k_dump_instant_prompt() {
precmd_functions=(${(@)precmd_functions:#_p9k_instant_prompt_precmd_first})
}
precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions)
DISABLE_UPDATE_PROMPT=true
} && unsetopt prompt_cr prompt_sp || true'
} always {
exec {fd}>&-