diff options
| author | LangLangBart <92653266+LangLangBart@users.noreply.github.com> | 2024-04-17 11:03:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 18:03:12 +0900 |
| commit | d169c951f3abe95ac533864d3ce0515bcb89adce (patch) | |
| tree | 82cf5758422b6bfa407c26c2f3cc248578062768 /shell/completion.zsh | |
| parent | 90d7e38909bc704afea96e23acf93ba05ef9f0af (diff) | |
| download | fzf-d169c951f3abe95ac533864d3ce0515bcb89adce.tar.gz | |
fix: Move 'emulate' command outside interactive check (#3736)
Diffstat (limited to 'shell/completion.zsh')
| -rw-r--r-- | shell/completion.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh index 7067b06f..3de9fe49 100644 --- a/shell/completion.zsh +++ b/shell/completion.zsh @@ -9,8 +9,6 @@ # - $FZF_COMPLETION_TRIGGER (default: '**') # - $FZF_COMPLETION_OPTS (default: empty) -if [[ -o interactive ]]; then - # Both branches of the following `if` do the same thing -- define # __fzf_completion_options such that `eval $__fzf_completion_options` sets @@ -75,6 +73,9 @@ fi # This brace is the start of try-always block. The `always` part is like # `finally` in lesser languages. We use it to *always* restore user options. { +# The 'emulate' command should not be placed inside the interactive if check; +# placing it there fails to disable alias expansion. See #3731. +if [[ -o interactive ]]; then # To use custom commands instead of find, override _fzf_compgen_{path,dir} # @@ -345,11 +346,10 @@ fzf-completion() { zle -N fzf-completion bindkey '^I' fzf-completion +fi } always { # Restore the original options. eval $__fzf_completion_options 'unset' '__fzf_completion_options' } - -fi |
