summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-09-01 00:51:28 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-09-01 00:51:28 +0900
commit5660cebaf66b47f927d468422b7c1ad516c32916 (patch)
tree1ca1bea838d1cec80f54f479c51fd29271c70e16 /shell
parenta7e588ceac0f7250b0d257ec29e1a08354f2cad8 (diff)
[zsh-completion] Temporarily unset shwordsplit (#328)
Diffstat (limited to 'shell')
-rw-r--r--shell/completion.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh
index 57c4222f..f45c5389 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -99,7 +99,11 @@ EOF
}
fzf-completion() {
- local tokens cmd prefix trigger tail fzf matches lbuf d_cmds
+ local tokens cmd prefix trigger tail fzf matches lbuf d_cmds sws
+ if setopt | grep shwordsplit > /dev/null; then
+ sws=1
+ unsetopt shwordsplit
+ fi
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags
@@ -148,6 +152,7 @@ fzf-completion() {
else
eval "zle ${fzf_default_completion:-expand-or-complete}"
fi
+ [ -n "$sws" ] && setopt shwordsplit
}
[ -z "$fzf_default_completion" ] &&