minor cleanups to fzf plugin

pull/1639/head
cornfeedhobo 2020-07-12 12:33:29 -05:00
parent be2180c365
commit ca409b699d
No known key found for this signature in database
GPG Key ID: 724357093F994B26
1 changed files with 6 additions and 4 deletions

View File

@ -4,14 +4,16 @@
cite about-plugin cite about-plugin
about-plugin 'load fzf, if you are using it' about-plugin 'load fzf, if you are using it'
if [ -f ~/.fzf.bash ]; then _command_exists fzf || return
if [ -r ~/.fzf.bash ]; then
source ~/.fzf.bash source ~/.fzf.bash
elif [ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ]; then elif [ -r "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ]; then
source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
fi fi
if [ -z ${FZF_DEFAULT_COMMAND+x} ]; then if [ -z ${FZF_DEFAULT_COMMAND+x} ] && _command_exists fd ; then
command -v fd &> /dev/null && export FZF_DEFAULT_COMMAND='fd --type f' export FZF_DEFAULT_COMMAND='fd --type f'
fi fi
fe() { fe() {