1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-22 07:11:58 +00:00

print a warning when POWERLEVEL9K_RULER_CHAR is invalid

This commit is contained in:
romkatv 2019-05-28 21:06:03 +02:00
parent e250797719
commit 58545efa01

View file

@ -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