From db99887fb561f691bf9c39659b2e1b145181fd3a Mon Sep 17 00:00:00 2001 From: gwbeip Date: Fri, 5 Jun 2026 10:07:00 +0800 Subject: [PATCH] feat(Bash): only activate fzf keybindings when logging in interactively. --- bash/keybindings/fzf_keybindings.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bash/keybindings/fzf_keybindings.sh b/bash/keybindings/fzf_keybindings.sh index df80e19..7878d08 100644 --- a/bash/keybindings/fzf_keybindings.sh +++ b/bash/keybindings/fzf_keybindings.sh @@ -51,6 +51,8 @@ __pj_fzf_history_widget() { } # Alt-f: file selector, Alt-d: directory selector, Alt-h: history selector -bind -x '"\ef":__pj_fzf_file_widget' -bind -x '"\ed":__pj_fzf_dir_widget' -bind -x '"\eh":__pj_fzf_history_widget' +if [[ $- == *i* ]]; then + bind -x '"\ef":__pj_fzf_file_widget' + bind -x '"\ed":__pj_fzf_dir_widget' + bind -x '"\eh":__pj_fzf_history_widget' +fi