File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 9
9
# - $FZF_COMPLETION_TRIGGER (default: '**')
10
10
# - $FZF_COMPLETION_OPTS (default: empty)
11
11
12
- if [[ -o interactive ]]; then
13
-
14
12
15
13
# Both branches of the following `if` do the same thing -- define
16
14
# __fzf_completion_options such that `eval $__fzf_completion_options` sets
75
73
# This brace is the start of try-always block. The `always` part is like
76
74
# `finally` in lesser languages. We use it to *always* restore user options.
77
75
{
76
+ # The 'emulate' command should not be placed inside the interactive if check;
77
+ # placing it there fails to disable alias expansion. See #3731.
78
+ if [[ -o interactive ]]; then
78
79
79
80
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
80
81
#
@@ -345,11 +346,10 @@ fzf-completion() {
345
346
346
347
zle -N fzf-completion
347
348
bindkey ' ^I' fzf-completion
349
+ fi
348
350
349
351
} always {
350
352
# Restore the original options.
351
353
eval $__fzf_completion_options
352
354
' unset' ' __fzf_completion_options'
353
355
}
354
-
355
- fi
Original file line number Diff line number Diff line change 11
11
# - $FZF_ALT_C_COMMAND
12
12
# - $FZF_ALT_C_OPTS
13
13
14
- if [[ -o interactive ]]; then
15
-
16
14
17
15
# Key bindings
18
16
# ------------
38
36
' builtin' ' emulate' ' zsh' && ' builtin' ' setopt' ' no_aliases'
39
37
40
38
{
39
+ if [[ -o interactive ]]; then
41
40
42
41
# CTRL-T - Paste the selected file path(s) into the command line
43
42
__fsel () {
@@ -114,10 +113,9 @@ zle -N fzf-history-widget
114
113
bindkey -M emacs ' ^R' fzf-history-widget
115
114
bindkey -M vicmd ' ^R' fzf-history-widget
116
115
bindkey -M viins ' ^R' fzf-history-widget
116
+ fi
117
117
118
118
} always {
119
119
eval $__fzf_key_bindings_options
120
120
' unset' ' __fzf_key_bindings_options'
121
121
}
122
-
123
- fi
You can’t perform that action at this time.
0 commit comments