From 519a8d2b321655a97beb60f5c5669fd81668d6e7 Mon Sep 17 00:00:00 2001 From: odrling Date: Mon, 27 Nov 2023 21:12:45 +0100 Subject: [PATCH] [bash] opt-in for fzf completion --- .bashrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 2ca8779..1b7d864 100644 --- a/.bashrc +++ b/.bashrc @@ -34,8 +34,13 @@ complete -cf doas if command -v fzf 2>&1 > /dev/null; then source ~/.bash/fzf/shell/completion.bash source ~/.bash/fzf/shell/key-bindings.bash - source ~/.bash/fzf-tab-completion/bash/fzf-bash-completion.sh - bind -x '"\t": fzf_bash_completion' + if [ -n "$FZF_COMPLETION" ]; then + source ~/.bash/fzf/shell/completion.bash + source ~/.bash/fzf-tab-completion/bash/fzf-bash-completion.sh + bind -x '"\t": fzf_bash_completion' + + _fzf_bash_completion_loading_msg() { echo "${PS1@P}${READLINE_LINE}" | tail -n1; } + fi fi # prompt