aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-18 14:09:56 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-18 14:09:56 +0300
commitcd4d1358b3971983381dfeaef615b9c8dfd444cb (patch)
treec1859fd09d3bd4d401aa12df1616c91ad445e33f /internal/p10k.zsh
parent86d641298852f3e809cbcd3d26dc09d7eaef7693 (diff)
fix quoting in dir
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh7
1 files changed, 6 insertions, 1 deletions
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