From b3f7de38937a12cfd0cef6eb40069dc7d91b529c Mon Sep 17 00:00:00 2001 From: Eduardo Bellido Bellido Date: Sun, 11 Nov 2018 14:14:02 +0100 Subject: [PATCH] Support XDG in fzf plugin --- plugins/available/fzf.plugin.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/available/fzf.plugin.bash b/plugins/available/fzf.plugin.bash index f2eddeb1..def60825 100644 --- a/plugins/available/fzf.plugin.bash +++ b/plugins/available/fzf.plugin.bash @@ -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'