mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
fix quoting in dir
This commit is contained in:
parent
86d6412988
commit
cd4d1358b3
1 changed files with 6 additions and 1 deletions
|
@ -1165,7 +1165,7 @@ prompt_dir() {
|
||||||
local -i saved=$(($#dir - j - d))
|
local -i saved=$(($#dir - j - d))
|
||||||
if (( saved > 0 )); then
|
if (( saved > 0 )); then
|
||||||
if (( q )); 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
|
else
|
||||||
parts[i]='${${${_P9K_M:#-*}:+'$dir'}:-'$dir[1,j]$'\1''${$((_P9K_M+='$saved'))+}}'
|
parts[i]='${${${_P9K_M:#-*}:+'$dir'}:-'$dir[1,j]$'\1''${$((_P9K_M+='$saved'))+}}'
|
||||||
fi
|
fi
|
||||||
|
@ -1174,6 +1174,11 @@ prompt_dir() {
|
||||||
fi
|
fi
|
||||||
parent+=/$dir
|
parent+=/$dir
|
||||||
done
|
done
|
||||||
|
if (( q )); then
|
||||||
|
for ((; i <= $#parts; ++i)); do
|
||||||
|
parts[i]='${(Q)${:-'${(qqq)${(q)parts[i]}}'}}'
|
||||||
|
done
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
truncate_with_folder_marker)
|
truncate_with_folder_marker)
|
||||||
if [[ -n $POWERLEVEL9K_SHORTEN_FOLDER_MARKER ]]; then
|
if [[ -n $POWERLEVEL9K_SHORTEN_FOLDER_MARKER ]]; then
|
||||||
|
|
Loading…
Reference in a new issue