mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-29 06:40:08 +00:00
don't print concole output warning if oh-my-zsh updates during instant prompt
This commit is contained in:
parent
7b77d63e7e
commit
e371319f49
1 changed files with 45 additions and 40 deletions
|
@ -4274,46 +4274,51 @@ function _p9k_clear_instant_prompt() {
|
||||||
local sp="${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
|
local sp="${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
|
||||||
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
|
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
|
||||||
if [[ -n ${(S)content//$'\e'*($'\a'|$'\e\\')} ]]; then
|
if [[ -n ${(S)content//$'\e'*($'\a'|$'\e\\')} ]]; then
|
||||||
echo -E - ""
|
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
|
||||||
echo -E - "${(%):-[%3FWARNING%f]: Console output during zsh initialization detected.}"
|
local omz2='Updating Oh My Zsh'
|
||||||
echo -E - ""
|
local omz3='Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh'$'\n'
|
||||||
echo -E - "${(%):-When using Powerlevel10k with instant prompt, console output during zsh}"
|
if [[ -n ${${content/$omz1}/$omz2*$omz3} ]]; then
|
||||||
echo -E - "${(%):-initialization may indicate issues.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):-[%3FWARNING%f]: Console output during zsh initialization detected.}"
|
||||||
echo -E - "${(%):-You can:}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):-When using Powerlevel10k with instant prompt, console output during zsh}"
|
||||||
echo -E - "${(%):- - %BRecommended%b: Change %B$__p9k_zshrc_u%b so that it does not perform console I/O}"
|
echo -E - "${(%):-initialization may indicate issues.}"
|
||||||
echo -E - "${(%):- after the instant prompt preamble. See the link below for details.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):-You can:}"
|
||||||
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
echo -E - ""
|
||||||
echo -E - "${(%):- * Zsh will start %Bquickly%b and prompt will update %Bsmoothly%b.}"
|
echo -E - "${(%):- - %BRecommended%b: Change %B$__p9k_zshrc_u%b so that it does not perform console I/O}"
|
||||||
echo -E - ""
|
echo -E - "${(%):- after the instant prompt preamble. See the link below for details.}"
|
||||||
echo -E - "${(%):- - Suppress this warning either by running %Bp10k configure%b or by manually}"
|
echo -E - ""
|
||||||
echo -E - "${(%):- defining the following parameter:}"
|
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
||||||
echo -E - ""
|
echo -E - "${(%):- * Zsh will start %Bquickly%b and prompt will update %Bsmoothly%b.}"
|
||||||
echo -E - "${(%):- %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=quiet}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- - Suppress this warning either by running %Bp10k configure%b or by manually}"
|
||||||
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
echo -E - "${(%):- defining the following parameter:}"
|
||||||
echo -E - "${(%):- * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=quiet}"
|
||||||
echo -E - "${(%):- - Disable instant prompt either by running %Bp10k configure%b or by manually}"
|
echo -E - ""
|
||||||
echo -E - "${(%):- defining the following parameter:}"
|
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
||||||
echo -E - ""
|
echo -E - "${(%):- * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}"
|
||||||
echo -E - "${(%):- %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=off}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- - Disable instant prompt either by running %Bp10k configure%b or by manually}"
|
||||||
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
echo -E - "${(%):- defining the following parameter:}"
|
||||||
echo -E - "${(%):- * Zsh will start %Bslowly%b.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- %3Ftypeset%f -g POWERLEVEL9K_INSTANT_PROMPT=off}"
|
||||||
echo -E - "${(%):- - Do nothing.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- * You %Bwill not%b see this error message again.}"
|
||||||
echo -E - "${(%):- * You %Bwill%b see this error message every time you start zsh.}"
|
echo -E - "${(%):- * Zsh will start %Bslowly%b.}"
|
||||||
echo -E - "${(%):- * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):- - Do nothing.}"
|
||||||
echo -E - "${(%):-For details, see:}"
|
echo -E - ""
|
||||||
echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}"
|
echo -E - "${(%):- * You %Bwill%b see this error message every time you start zsh.}"
|
||||||
echo -E - ""
|
echo -E - "${(%):- * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}"
|
||||||
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
|
echo -E - ""
|
||||||
echo -E - ""
|
echo -E - "${(%):-For details, see:}"
|
||||||
|
echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}"
|
||||||
|
echo -E - ""
|
||||||
|
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
|
||||||
|
echo -E - ""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
cat $__p9k_instant_prompt_output
|
cat $__p9k_instant_prompt_output
|
||||||
echo -nE - $sp
|
echo -nE - $sp
|
||||||
|
|
Loading…
Reference in a new issue