make error message about incorrect powerlevel10k loading visible in more cases

pull/829/head
Roman Perepelitsa 4 years ago
parent b7d90c8467
commit fb5a0a6cca

@ -8122,13 +8122,14 @@ _p9k_init() {
_p9k_init_vcs _p9k_init_vcs
if (( _p9k__instant_prompt_disabled )); then if (( _p9k__instant_prompt_disabled )); then
unset __p9k_instant_prompt_erased (( _POWERLEVEL9K_DISABLE_INSTANT_PROMPT )) && unset __p9k_instant_prompt_erased
_p9k_delete_instant_prompt _p9k_delete_instant_prompt
_p9k_dumped_instant_prompt_sigs=() _p9k_dumped_instant_prompt_sigs=()
fi fi
if (( $+__p9k_instant_prompt_erased )); then if (( $+__p9k_instant_prompt_erased )); then
unset __p9k_instant_prompt_erased unset __p9k_instant_prompt_erased
{
>&2 echo -E - "" >&2 echo -E - ""
>&2 echo -E - "${(%):-[%1FERROR%f]: When using instant prompt, Powerlevel10k must be loaded before the first prompt.}" >&2 echo -E - "${(%):-[%1FERROR%f]: When using instant prompt, Powerlevel10k must be loaded before the first prompt.}"
>&2 echo -E - "" >&2 echo -E - ""
@ -8140,7 +8141,14 @@ _p9k_init() {
else else
>&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}" >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}"
fi fi
if (( $+functins[zplugin] )); then if (( $+zsh_defer_options )); then
>&2 echo -E - ""
>&2 echo -E - "${(%):- NOTE: Do not use %1Fzsh-defer%f to load %Upowerlevel10k.zsh-theme%u.}"
elif (( $+functins[zinit] )); then
>&2 echo -E - ""
>&2 echo -E - "${(%):- NOTE: If using %2Fzinit%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}"
elif (( $+functins[zplugin] )); then
>&2 echo -E - ""
>&2 echo -E - "${(%):- NOTE: If using %2Fzplugin%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}" >&2 echo -E - "${(%):- NOTE: If using %2Fzplugin%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}"
fi fi
>&2 echo -E - "" >&2 echo -E - ""
@ -8160,6 +8168,7 @@ _p9k_init() {
>&2 echo -E - "${(%):- * You %Bwill%b see this error message every time you start zsh.}" >&2 echo -E - "${(%):- * You %Bwill%b see this error message every time you start zsh.}"
>&2 echo -E - "${(%):- * Zsh will start %Bslowly%b.}" >&2 echo -E - "${(%):- * Zsh will start %Bslowly%b.}"
>&2 echo -E - "" >&2 echo -E - ""
} 2>>$TTY
fi fi
} }

Loading…
Cancel
Save