1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 05:30:06 +00:00

make error message about incorrect powerlevel10k loading visible in more cases

This commit is contained in:
Roman Perepelitsa 2020-06-11 11:06:02 +02:00
parent b7d90c8467
commit fb5a0a6cca

View file

@ -8122,13 +8122,14 @@ _p9k_init() {
_p9k_init_vcs
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_dumped_instant_prompt_sigs=()
fi
if (( $+__p9k_instant_prompt_erased )); then
unset __p9k_instant_prompt_erased
{
>&2 echo -E - ""
>&2 echo -E - "${(%):-[%1FERROR%f]: When using instant prompt, Powerlevel10k must be loaded before the first prompt.}"
>&2 echo -E - ""
@ -8140,7 +8141,14 @@ _p9k_init() {
else
>&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}"
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.}"
fi
>&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 - "${(%):- * Zsh will start %Bslowly%b.}"
>&2 echo -E - ""
} 2>>$TTY
fi
}