summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-22 23:43:35 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-22 23:43:35 +0300
commitee443592569251bcd2d980a20dc6b28327a162e9 (patch)
tree30008bffa46b167a3a6b63c36025cf6a674376fc /internal/p10k.zsh
parent17240f3c55b724c9e319d7c7ad538a4671ae96dd (diff)
wrap unescaped multiline prefixes; fixes #125
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh12
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c32eb538..53268803 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3197,8 +3197,9 @@ _p9k_init_lines() {
_p9k_get_icon '' LEFT_SEGMENT_END_SEPARATOR
if [[ -n $_P9K_RETVAL ]]; then
- # Not escaped for historical reasons.
_P9K_RETVAL+=%b%k%f
+ # Not escaped for historical reasons.
+ _P9K_RETVAL='${_P9K_Z::="'${${_P9K_RETVAL//\\/\\\\\\}//\"/\\\\\"}'"}'
if [[ $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
_P9K_LINE_SUFFIX_LEFT[-2]+=$_P9K_RETVAL
else
@@ -3211,16 +3212,18 @@ _p9k_init_lines() {
_P9K_LINE_GAP_POST[1]=$_P9K_RETVAL
if [[ $+POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX == 1 || $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
- # Not escaped for historical reasons.
_p9k_get_icon '' MULTILINE_FIRST_PROMPT_PREFIX
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
+ # Not escaped for historical reasons.
+ _P9K_RETVAL='${_P9K_Z::="'${${_P9K_RETVAL//\\/\\\\\\}//\"/\\\\\"}'"}'
_P9K_LINE_PREFIX_LEFT[1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[1]
fi
if [[ $+POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX == 1 || $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
- # Not escaped for historical reasons.
_p9k_get_icon '' MULTILINE_LAST_PROMPT_PREFIX
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
+ # Not escaped for historical reasons.
+ _P9K_RETVAL='${_P9K_Z::="'${${_P9K_RETVAL//\\/\\\\\\}//\"/\\\\\"}'"}'
_P9K_LINE_PREFIX_LEFT[-1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[-1]
fi
@@ -3245,9 +3248,10 @@ _p9k_init_lines() {
_P9K_LINE_GAP_POST[2,-2]=(${${:-{3..num_lines}}:/*/$_P9K_RETVAL})
if [[ $+POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX == 1 || $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
- # Not escaped for historical reasons.
_p9k_get_icon '' MULTILINE_NEWLINE_PROMPT_PREFIX
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
+ # Not escaped for historical reasons.
+ _P9K_RETVAL='${_P9K_Z::="'${${_P9K_RETVAL//\\/\\\\\\}//\"/\\\\\"}'"}'
_P9K_LINE_PREFIX_LEFT[2,-2]=$_P9K_RETVAL${^_P9K_LINE_PREFIX_LEFT[2,-2]}
fi