Skip to content

Commit

Permalink
Merge pull request #1998 from tsiflimagas/fzf-plugin
Browse files Browse the repository at this point in the history
Fix checking whether fzf is already in PATH
  • Loading branch information
NoahGorny committed Jan 3, 2022
2 parents 2e51e92 + 1c03eb6 commit f0abc3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/available/fzf.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0abc3f

Please sign in to comment.