Merge pull request #1268 from edubxb/fzf-xdg

Support XDG in fzf plugin
pull/1269/head
Nils Winkler 2018-11-12 08:21:16 +01:00 committed by GitHub
commit a8ee759293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

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