From f220106baaea3d771bc3f9f5c41150fef97b5b5c Mon Sep 17 00:00:00 2001 From: romkatv Date: Wed, 1 Jan 2020 18:07:40 +0100 Subject: [PATCH] bug fix: escape backquote; fixes #404 --- internal/p10k.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index abdacd03..3b57ef3c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -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'