Fix bug that occurs when dirs contain spaces

When one of the parent directories contain spaces, the zle -M gets to
many arguments and complains. Quoting them solves this bug.
This commit is contained in:
2020-07-03 01:59:16 +02:00
parent da474b7899
commit 843d51b415

View File

@@ -62,10 +62,10 @@ function _expandDots {
LBUFFER+=/
zle self-insert
zle self-insert
[[ -e $dir ]] && zle -M ${dir:a:h}
[[ -e $dir ]] && zle -M "${dir:a:h}"
elif [[ $LBUFFER[-1] == '.' ]]; then
zle self-insert
[[ -e $dir ]] && zle -M ${dir:a:h}
[[ -e $dir ]] && zle -M "${dir:a:h}"
else
zle self-insert
fi