summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-05-28 22:06:03 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-05-28 22:06:03 +0300
commit58545efa017975ebaec91f403e9b431ae16b77c8 (patch)
treeace26736079e52ca604ae5d5de736d807afd457d /powerlevel9k.zsh-theme
parente250797719df5036b86e3a9bb6aeb49b79de3981 (diff)
print a warning when POWERLEVEL9K_RULER_CHAR is invalid
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 4 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 200b70f8..9732b609 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -2465,6 +2465,10 @@ _p9k_init() {
local pad_len="\$((COLUMNS-$ruler_len))"
_P9K_LEFT_PREFIX+="%b\${(pl$sep$ruler_len$sep$sep${(q)ruler_char}$sep)}%k%f"
_P9K_LEFT_PREFIX+="\${(l$sep$pad_len$sep$sep $sep)}"
+ else
+ print -P "%F{red}WARNING!%f %BPOWERLEVEL9K_RULER_CHAR%b is not one character long. Ruler won't be rendered."
+ print -P "Either change the value of %BPOWERLEVEL9K_RULER_CHAR%b or set %BPOWERLEVEL9K_SHOW_RULER=false%b to"
+ print -P "disable ruler."
fi
fi