summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-12 11:05:57 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-12 11:05:57 +0300
commit552e629be871e65460da72ad2325e9fefda93f9c (patch)
tree4f1105fb90a2acbcc3a50a1afe3db83292416b7b /internal
parent502baefcec3a5e0f31cf322b8f67bab7457884f1 (diff)
add a warning if POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR is set (it is no longer supported)
Diffstat (limited to 'internal')
-rwxr-xr-xinternal/p10k.zsh22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index fef0d4f4..0059594c 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3000,6 +3000,28 @@ _p9k_init() {
fi
fi
+ if [[ -n $POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR ]]; then
+ print -P "%F{yellow}WARNING!%f %F{red}POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR%f is no longer supported!"
+ print -P ""
+ print -P "To fix your prompt, replace %F{red}POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR%f with"
+ print -P "%F{green}POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL%f."
+ print -P ""
+ print -P " %F{red} - POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR=${(qqq)${POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR//\%/%%}}%f"
+ print -P " %F{green} + POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=${(qqq)${POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR//\%/%%}}%f"
+ if [[ -n $POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR ]]; then
+ print -P ""
+ print -P "While at it, also replace %F{red}POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR%f with"
+ print -P "%F{green}POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL%f. The new option, unlike"
+ print -P "the old, works correctly in multiline prompts."
+ print -P ""
+ print -P " %F{red} - POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR=${(qqq)${POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR//\%/%%}}%f"
+ print -P " %F{green} + POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=${(qqq)${POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR//\%/%%}}%f"
+ fi
+ print -P ""
+ print -P "To get rid of this warning without changing the appearance of your prompt,"
+ print -P "remove %F{red}POWERLEVEL9K_RIGHT_SEGMENT_END_SEPARATOR%f from your config"
+ fi
+
if segment_in_use longstatus; then
print -P '%F{yellow}WARNING!%f The "longstatus" segment is deprecated. Use "%F{blue}status%f" instead.'
print -P 'For more informations, have a look at https://github.com/bhilburn/powerlevel9k/blob/master/CHANGELOG.md.'