From cd4d1358b3971983381dfeaef615b9c8dfd444cb Mon Sep 17 00:00:00 2001 From: romkatv Date: Thu, 18 Jul 2019 13:09:56 +0200 Subject: [PATCH] fix quoting in dir --- internal/p10k.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index b46f0798..a1094c8e 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1165,7 +1165,7 @@ prompt_dir() { local -i saved=$(($#dir - j - d)) if (( saved > 0 )); then if (( q )); then - parts[i]='${${${_P9K_M:#-*}:+${(Q)\${:-'${(qqq)${(q)dir}}'}}}:-${(Q)\${:-'${(qqq)${(q)dir[1,j]}}$'}}\1''${$((_P9K_M+='$saved'))+}}' + parts[i]='${${${_P9K_M:#-*}:+${(Q)${:-'${(qqq)${(q)dir}}'}}}:-${(Q)${:-'${(qqq)${(q)dir[1,j]}}$'}}\1''${$((_P9K_M+='$saved'))+}}' else parts[i]='${${${_P9K_M:#-*}:+'$dir'}:-'$dir[1,j]$'\1''${$((_P9K_M+='$saved'))+}}' fi @@ -1174,6 +1174,11 @@ prompt_dir() { fi parent+=/$dir done + if (( q )); then + for ((; i <= $#parts; ++i)); do + parts[i]='${(Q)${:-'${(qqq)${(q)parts[i]}}'}}' + done + fi ;; truncate_with_folder_marker) if [[ -n $POWERLEVEL9K_SHORTEN_FOLDER_MARKER ]]; then