mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-25 00:21:58 +00:00
bug fix: escape backquote; fixes #404
This commit is contained in:
parent
8baa6d3a35
commit
f220106baa
1 changed files with 4 additions and 4 deletions
|
@ -468,7 +468,7 @@ _p9k_escape_style() {
|
|||
}
|
||||
|
||||
_p9k_escape() {
|
||||
[[ $1 == *["~!#\$^&*()\\\"'<>?{}[]"]* ]] && _p9k_ret="\${(Q)\${:-${(qqq)${(q)1}}}}" || _p9k_ret=$1
|
||||
[[ $1 == *["~!#\`\$^&*()\\\"'<>?{}[]"]* ]] && _p9k_ret="\${(Q)\${:-${(qqq)${(q)1}}}}" || _p9k_ret=$1
|
||||
}
|
||||
|
||||
# * $1: Name of the function that was originally invoked.
|
||||
|
@ -1496,7 +1496,7 @@ prompt_dir() {
|
|||
if [[ $pair == ${mtime:-x}:* ]]; then
|
||||
parts[i]=${pair#*:}
|
||||
else
|
||||
[[ $sub != *["~!#\$^&*()\\\"'<>?{}[]"]* ]]
|
||||
[[ $sub != *["~!#\`\$^&*()\\\"'<>?{}[]"]* ]]
|
||||
local -i q=$?
|
||||
if [[ -n $_POWERLEVEL9K_SHORTEN_FOLDER_MARKER &&
|
||||
-n $parent/$sub/${~_POWERLEVEL9K_SHORTEN_FOLDER_MARKER}(#qN) ]]; then
|
||||
|
@ -1525,7 +1525,7 @@ prompt_dir() {
|
|||
parent+=/$sub
|
||||
done
|
||||
for ((; i <= $#parts; ++i)); do
|
||||
[[ $parts[i] == *["~!#\$^&*()\\\"'<>?{}[]"]* ]] && parts[i]='${(Q)${:-'${(qqq)${(q)parts[i]}}'}}'
|
||||
[[ $parts[i] == *["~!#\`\$^&*()\\\"'<>?{}[]"]* ]] && parts[i]='${(Q)${:-'${(qqq)${(q)parts[i]}}'}}'
|
||||
parts[i]+=$'\2'
|
||||
done
|
||||
[[ -n $key ]] && _p9k_cache_ephemeral_set "$key" "${parts[@]}"
|
||||
|
@ -5473,7 +5473,7 @@ _p9k_must_init() {
|
|||
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||
_p9k_deinit
|
||||
fi
|
||||
_p9k__param_pat=$'v16\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat=$'v17\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
||||
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
||||
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'
|
||||
|
|
Loading…
Reference in a new issue