diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-04-10 00:46:09 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-04-10 00:46:09 +0900 |
| commit | 152988c17bd6c35ce55652d123db8b65a32f98e4 (patch) | |
| tree | c4608597a1b9b396277255d379bd1a17a93de107 /shell/completion.bash | |
| parent | 4cd37fc02b4491d4c9a5f6a27ad41895ad1a62cc (diff) | |
| download | fzf-152988c17bd6c35ce55652d123db8b65a32f98e4.tar.gz | |
[shell] Revert interactiveness checks for eval
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
Diffstat (limited to 'shell/completion.bash')
| -rw-r--r-- | shell/completion.bash | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/completion.bash b/shell/completion.bash index 3d3349e3..5786d046 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -9,7 +9,7 @@ # - $FZF_COMPLETION_TRIGGER (default: '**') # - $FZF_COMPLETION_OPTS (default: empty) -[[ $- =~ i ]] || return 0 +if [[ $- =~ i ]]; then # To use custom commands instead of find, override _fzf_compgen_{path,dir} @@ -581,3 +581,5 @@ _fzf_setup_completion 'var' export unset printenv _fzf_setup_completion 'alias' unalias _fzf_setup_completion 'host' telnet _fzf_setup_completion 'proc' kill + +fi |
