From 843d51b415eca3d86f60bcb50b4dc83f1ac2813a Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Fri, 3 Jul 2020 01:59:16 +0200 Subject: [PATCH] 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. --- .config/zsh/plugins/keys.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/zsh/plugins/keys.zsh b/.config/zsh/plugins/keys.zsh index c623b84..00ed1f8 100644 --- a/.config/zsh/plugins/keys.zsh +++ b/.config/zsh/plugins/keys.zsh @@ -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