diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-12 01:40:44 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-12 01:40:44 +0900 |
commit | 26d2af5ee8b254b5a150728aac428762a6f6e92b (patch) | |
tree | eb91cecfae56f5d375036e05c44f533e449cf8da /shell | |
parent | 2b61dc6557b3ecdca7f8641b0c7c4d55e03d725b (diff) |
[zsh-completion] Respect backslash-escaped spaces (#230)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/completion.zsh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh index 299826c1..99cc112c 100644 --- a/shell/completion.zsh +++ b/shell/completion.zsh @@ -12,7 +12,7 @@ _fzf_path_completion() { local base lbuf find_opts fzf_opts suffix tail fzf dir leftover matches nnm - base=$1 + base=${(Q)1} lbuf=$2 find_opts=$3 fzf_opts=$4 @@ -102,7 +102,8 @@ fzf-completion() { local tokens cmd prefix trigger tail fzf matches lbuf d_cmds # http://zsh.sourceforge.net/FAQ/zshfaq03.html - tokens=(${=LBUFFER}) + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags + tokens=(${(z)LBUFFER}) if [ ${#tokens} -lt 1 ]; then eval "zle ${fzf_default_completion:-expand-or-complete}" return |