From 1c03eb6b3ba6a4d7717a7372b2542c365bacb74d Mon Sep 17 00:00:00 2001 From: Kostas Giapis Date: Thu, 23 Dec 2021 15:09:05 +0200 Subject: [PATCH] Fix checking whether fzf is already in PATH --- plugins/available/fzf.plugin.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/available/fzf.plugin.bash b/plugins/available/fzf.plugin.bash index c4f5ea84..21182ac2 100644 --- a/plugins/available/fzf.plugin.bash +++ b/plugins/available/fzf.plugin.bash @@ -4,14 +4,15 @@ cite about-plugin about-plugin 'load fzf, if you are using it' -_command_exists fzf || return - if [ -r ~/.fzf.bash ] ; then source ~/.fzf.bash elif [ -r "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] ; then source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash fi +# No need to continue if the command is not present +_command_exists fzf || return + if [ -z ${FZF_DEFAULT_COMMAND+x} ] && _command_exists fd ; then export FZF_DEFAULT_COMMAND='fd --type f' fi