mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-20 22:31:57 +00:00
less escaping
This commit is contained in:
parent
608684757a
commit
94efac6aab
1 changed files with 9 additions and 9 deletions
|
@ -310,10 +310,10 @@ left_prompt_segment() {
|
||||||
p+="\${_P9K_N:=$((t+4))}" # 4
|
p+="\${_P9K_N:=$((t+4))}" # 4
|
||||||
|
|
||||||
_p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'
|
_p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'
|
||||||
local icon_exp_=${_P9K_RETVAL:+\"${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}\"}
|
local icon_exp_=${_P9K_RETVAL:+\"$_P9K_RETVAL\"}
|
||||||
|
|
||||||
_p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'
|
_p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'
|
||||||
local content_exp_=${_P9K_RETVAL:+\"${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}\"}
|
local content_exp_=${_P9K_RETVAL:+\"$_P9K_RETVAL\"}
|
||||||
|
|
||||||
if [[ ( $icon_exp_ != '"${P9K_VISUAL_IDENTIFIER}"' && $icon_exp_ == *'$'* ) ||
|
if [[ ( $icon_exp_ != '"${P9K_VISUAL_IDENTIFIER}"' && $icon_exp_ == *'$'* ) ||
|
||||||
( $content_exp_ != '"${P9K_CONTENT}"' && $content_exp_ == *'$'* ) ]]; then
|
( $content_exp_ != '"${P9K_CONTENT}"' && $content_exp_ == *'$'* ) ]]; then
|
||||||
|
@ -511,10 +511,10 @@ right_prompt_segment() {
|
||||||
p+="\${_P9K_N:=$((t+4))}" # 4
|
p+="\${_P9K_N:=$((t+4))}" # 4
|
||||||
|
|
||||||
_p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'
|
_p9k_param $1 VISUAL_IDENTIFIER_EXPANSION '${P9K_VISUAL_IDENTIFIER}'
|
||||||
local icon_exp_=${_P9K_RETVAL:+\"${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}\"}
|
local icon_exp_=${_P9K_RETVAL:+\"$_P9K_RETVAL\"}
|
||||||
|
|
||||||
_p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'
|
_p9k_param $1 CONTENT_EXPANSION '${P9K_CONTENT}'
|
||||||
local content_exp_=${_P9K_RETVAL:+\"${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}\"}
|
local content_exp_=${_P9K_RETVAL:+\"$_P9K_RETVAL\"}
|
||||||
|
|
||||||
if [[ ( $icon_exp_ != '"${P9K_VISUAL_IDENTIFIER}"' && $icon_exp_ == *'$'* ) ||
|
if [[ ( $icon_exp_ != '"${P9K_VISUAL_IDENTIFIER}"' && $icon_exp_ == *'$'* ) ||
|
||||||
( $content_exp_ != '"${P9K_CONTENT}"' && $content_exp_ == *'$'* ) ]]; then
|
( $content_exp_ != '"${P9K_CONTENT}"' && $content_exp_ == *'$'* ) ]]; then
|
||||||
|
@ -3145,7 +3145,7 @@ _p9k_build_gap_post() {
|
||||||
_P9K_RETVAL+='${(pl'$s'$((_P9K_M+1))'$s$s$char$s$')}'
|
_P9K_RETVAL+='${(pl'$s'$((_P9K_M+1))'$s$s$char$s$')}'
|
||||||
else
|
else
|
||||||
_P9K_RETVAL+='${${P9K_GAP::=${(pl'$s'$((_P9K_M+1))'$s$s$char$s$')}}+}'
|
_P9K_RETVAL+='${${P9K_GAP::=${(pl'$s'$((_P9K_M+1))'$s$s$char$s$')}}+}'
|
||||||
_P9K_RETVAL+='${:-"'${${exp//\\/\\\\}//\"/\\\"}'"}'
|
_P9K_RETVAL+='${:-"'$exp'"}'
|
||||||
style=1
|
style=1
|
||||||
fi
|
fi
|
||||||
_P9K_RETVAL+='$_P9K_RPROMPT$_P9K_T[$((1+!_P9K_IND))]}:-\n}'
|
_P9K_RETVAL+='$_P9K_RPROMPT$_P9K_T[$((1+!_P9K_IND))]}:-\n}'
|
||||||
|
@ -3200,7 +3200,7 @@ _p9k_init_lines() {
|
||||||
if [[ -n $_P9K_RETVAL ]]; then
|
if [[ -n $_P9K_RETVAL ]]; then
|
||||||
_P9K_RETVAL+=%b%k%f
|
_P9K_RETVAL+=%b%k%f
|
||||||
# Not escaped for historical reasons.
|
# Not escaped for historical reasons.
|
||||||
_P9K_RETVAL='${:-"'${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}'"}'
|
_P9K_RETVAL='${:-"'$_P9K_RETVAL'"}'
|
||||||
if [[ $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
|
if [[ $POWERLEVEL9K_PROMPT_ON_NEWLINE == true ]]; then
|
||||||
_P9K_LINE_SUFFIX_LEFT[-2]+=$_P9K_RETVAL
|
_P9K_LINE_SUFFIX_LEFT[-2]+=$_P9K_RETVAL
|
||||||
else
|
else
|
||||||
|
@ -3216,7 +3216,7 @@ _p9k_init_lines() {
|
||||||
_p9k_get_icon '' MULTILINE_FIRST_PROMPT_PREFIX
|
_p9k_get_icon '' MULTILINE_FIRST_PROMPT_PREFIX
|
||||||
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
||||||
# Not escaped for historical reasons.
|
# Not escaped for historical reasons.
|
||||||
_P9K_RETVAL='${:-"'${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}'"}'
|
_P9K_RETVAL='${:-"'$_P9K_RETVAL'"}'
|
||||||
_P9K_LINE_PREFIX_LEFT[1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[1]
|
_P9K_LINE_PREFIX_LEFT[1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[1]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -3224,7 +3224,7 @@ _p9k_init_lines() {
|
||||||
_p9k_get_icon '' MULTILINE_LAST_PROMPT_PREFIX
|
_p9k_get_icon '' MULTILINE_LAST_PROMPT_PREFIX
|
||||||
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
||||||
# Not escaped for historical reasons.
|
# Not escaped for historical reasons.
|
||||||
_P9K_RETVAL='${:-"'${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}'"}'
|
_P9K_RETVAL='${:-"'$_P9K_RETVAL'"}'
|
||||||
_P9K_LINE_PREFIX_LEFT[-1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[-1]
|
_P9K_LINE_PREFIX_LEFT[-1]=$_P9K_RETVAL$_P9K_LINE_PREFIX_LEFT[-1]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -3252,7 +3252,7 @@ _p9k_init_lines() {
|
||||||
_p9k_get_icon '' MULTILINE_NEWLINE_PROMPT_PREFIX
|
_p9k_get_icon '' MULTILINE_NEWLINE_PROMPT_PREFIX
|
||||||
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
[[ _P9K_RETVAL == *%* ]] && _P9K_RETVAL+=%b%k%f
|
||||||
# Not escaped for historical reasons.
|
# Not escaped for historical reasons.
|
||||||
_P9K_RETVAL='${:-"'${${_P9K_RETVAL//\\/\\\\}//\"/\\\"}'"}'
|
_P9K_RETVAL='${:-"'$_P9K_RETVAL'"}'
|
||||||
_P9K_LINE_PREFIX_LEFT[2,-2]=$_P9K_RETVAL${^_P9K_LINE_PREFIX_LEFT[2,-2]}
|
_P9K_LINE_PREFIX_LEFT[2,-2]=$_P9K_RETVAL${^_P9K_LINE_PREFIX_LEFT[2,-2]}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue