Skip to content
Myr

[shell] Revert interactiveness checks for eval

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

So that there's no error even when the scripts are mistakenly evaluated in non-interactive sessions. bash -c 'eval "$(fzf --bash)"; echo done' zsh -c 'eval "$(fzf --zsh)"; echo done' * https://github.com/junegunn/fzf/pull/3675#issuecomment-2044860901 * https://github.com/junegunn/fzf/commit/f103aa4753b435f8f45c5130323effeb75583c15

authored by Junegunn Choi · committed by Junegunn Choi · parent 4cd37fc · Browse files · 4 files+12 added−4 removed
This commit

State

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

Diff stats

4 files+12 added−4 removed

  • other:+12 added−4 removed

4 files+12 added−4 removed

modified:shell/completion.bash+3 added-1 removed
7 unmodified lines
8# - $FZF_TMUX_OPTS (default: empty)9# - $FZF_COMPLETION_TRIGGER (default: '**')10# - $FZF_COMPLETION_OPTS (default: empty)1112[[ $- =~ i ]] || return 012if [[ $- =~ i ]]; then131415# To use custom commands instead of find, override _fzf_compgen_{path,dir}16#
563 unmodified lines
580_fzf_setup_completion 'var' export unset printenv581_fzf_setup_completion 'alias' unalias582_fzf_setup_completion 'host' telnet583_fzf_setup_completion 'proc' kill584585fi
modified:shell/completion.zsh+3 added-1 removed
7 unmodified lines
8# - $FZF_TMUX_OPTS (default: '-d 40%')9# - $FZF_COMPLETION_TRIGGER (default: '**')10# - $FZF_COMPLETION_OPTS (default: empty)1112[[ -o interactive ]] || return 012if [[ -o interactive ]]; then131415# Both branches of the following `if` do the same thing -- define16# __fzf_completion_options such that `eval $__fzf_completion_options` sets
333 unmodified lines
350 # Restore the original options.351 eval $__fzf_completion_options352 'unset' '__fzf_completion_options'353}354355fi
modified:shell/key-bindings.bash+3 added-1 removed
modified:shell/key-bindings.zsh+3 added-1 removed
9 unmodified lines
10# - $FZF_CTRL_R_OPTS11# - $FZF_ALT_C_COMMAND12# - $FZF_ALT_C_OPTS1314[[ -o interactive ]] || return 014if [[ -o interactive ]]; then151617# Key bindings18# ------------
99 unmodified lines
118} always {119 eval $__fzf_key_bindings_options120 'unset' '__fzf_key_bindings_options'121}122123fi