File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 99# - $FZF_COMPLETION_TRIGGER (default: '**')
1010# - $FZF_COMPLETION_OPTS (default: empty)
1111
12- if [[ -o interactive ]]; then
13-
1412
1513# Both branches of the following `if` do the same thing -- define
1614# __fzf_completion_options such that `eval $__fzf_completion_options` sets
7573# This brace is the start of try-always block. The `always` part is like
7674# `finally` in lesser languages. We use it to *always* restore user options.
7775{
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
7879
7980# To use custom commands instead of find, override _fzf_compgen_{path,dir}
8081#
@@ -345,11 +346,10 @@ fzf-completion() {
345346
346347zle -N fzf-completion
347348bindkey ' ^I' fzf-completion
349+ fi
348350
349351} always {
350352 # Restore the original options.
351353 eval $__fzf_completion_options
352354 ' unset' ' __fzf_completion_options'
353355}
354-
355- fi
Original file line number Diff line number Diff line change 1111# - $FZF_ALT_C_COMMAND
1212# - $FZF_ALT_C_OPTS
1313
14- if [[ -o interactive ]]; then
15-
1614
1715# Key bindings
1816# ------------
3836' builtin' ' emulate' ' zsh' && ' builtin' ' setopt' ' no_aliases'
3937
4038{
39+ if [[ -o interactive ]]; then
4140
4241# CTRL-T - Paste the selected file path(s) into the command line
4342__fsel () {
@@ -114,10 +113,9 @@ zle -N fzf-history-widget
114113bindkey -M emacs ' ^R' fzf-history-widget
115114bindkey -M vicmd ' ^R' fzf-history-widget
116115bindkey -M viins ' ^R' fzf-history-widget
116+ fi
117117
118118} always {
119119 eval $__fzf_key_bindings_options
120120 ' unset' ' __fzf_key_bindings_options'
121121}
122-
123- fi
You can’t perform that action at this time.
0 commit comments