summaryrefslogtreecommitdiffstats
path: root/shell/completion.zsh
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-05-26 00:52:06 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-05-26 00:52:06 +0900
commitbdb94fba7db3d0b59954b474439c28fb1f3fa8d8 (patch)
tree143ebf0b6f44db40d4e294dc083a34b60fc0cb54 /shell/completion.zsh
parent2f364c62f442af24ed332dc6fe018e676b8dd28c (diff)
[zsh] Fix #579 - Locally unset globsubst
Diffstat (limited to 'shell/completion.zsh')
-rw-r--r--shell/completion.zsh8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh
index 74d1ad32..0094fa74 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -31,7 +31,7 @@ fi
###########################################################
__fzf_generic_path_completion() {
- local base lbuf compgen fzf_opts suffix tail fzf dir leftover matches nnm
+ local base lbuf compgen fzf_opts suffix tail fzf dir leftover matches
# (Q) flag removes a quoting level: "foo\ bar" => "foo bar"
base=${(Q)1}
lbuf=$2
@@ -41,10 +41,7 @@ __fzf_generic_path_completion() {
tail=$6
[ ${FZF_TMUX:-1} -eq 1 ] && fzf="fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%}" || fzf="fzf"
- if ! setopt | \grep nonomatch > /dev/null; then
- nnm=1
- setopt nonomatch
- fi
+ setopt localoptions nonomatch
dir="$base"
while [ 1 ]; do
if [ -z "$dir" -o -d ${~dir} ]; then
@@ -66,7 +63,6 @@ __fzf_generic_path_completion() {
dir=$(dirname "$dir")
dir=${dir%/}/
done
- [ -n "$nnm" ] && unsetopt nonomatch
}
_fzf_path_completion() {