Skip to content
Myr

fix: Move 'emulate' command outside interactive check (#3736)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by LangLangBart · committed by GitHub · parent 90d7e38 · Browse files · 2 files+6 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−8 removed

  • other:+6 added−8 removed

2 files+6 added−8 removed

modified:shell/completion.zsh+4 added-4 removed
7 unmodified lines
8# - $FZF_TMUX_OPTS (default: '-d 40%')9# - $FZF_COMPLETION_TRIGGER (default: '**')10# - $FZF_COMPLETION_OPTS (default: empty)1112if [[ -o interactive ]]; then121413# Both branches of the following `if` do the same thing -- define14# __fzf_completion_options such that `eval $__fzf_completion_options` sets15# all options to the same values they currently have. We'll do just that at16# the bottom of the file after changing options to what we prefer.
55 unmodified lines
7273# This brace is the start of try-always block. The `always` part is like74# `finally` in lesser languages. We use it to *always* restore user options.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.78if [[ -o interactive ]]; then7980# To use custom commands instead of find, override _fzf_compgen_{path,dir}81#82# _fzf_compgen_path() {
262 unmodified lines
345}346347zle -N fzf-completion348bindkey '^I' fzf-completion349fi350351} always {352 # Restore the original options.353 eval $__fzf_completion_options354 'unset' '__fzf_completion_options'355}354355fi
modified:shell/key-bindings.zsh+2 added-4 removed