summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-01-07 12:52:06 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-01-07 12:52:06 +0300
commit784fea72b524b8b47e749615f665cb57669d087f (patch)
treee5df7babd795e1730f7ee6aff40cba88810a7b51
parente371319f496eb66f4fb225d969b0ea77bbfe7048 (diff)
fix omz update detection
-rw-r--r--internal/p10k.zsh7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 4193f5ba..e2e00b03 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4273,11 +4273,12 @@ function _p9k_clear_instant_prompt() {
local cr=$'\r'
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]
- if [[ -n ${(S)content//$'\e'*($'\a'|$'\e\\')} ]]; then
+ local unexpected=${(S)content//$'\e'*($'\a'|$'\e\\')}
+ if [[ -n $unexpected ]]; then
local omz1='[Oh My Zsh] Would you like to update? [Y/n]: '
local omz2='Updating Oh My Zsh'
- local omz3='Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh'$'\n'
- if [[ -n ${${content/$omz1}/$omz2*$omz3} ]]; then
+ local omz3='https://shop.planetargon.com/collections/oh-my-zsh'
+ if [[ -n ${${unexpected/$omz1}/$omz2*$omz3($'\n'|)} ]]; then
echo -E - ""
echo -E - "${(%):-[%3FWARNING%f]: Console output during zsh initialization detected.}"
echo -E - ""