diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-09-11 12:27:24 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-09-11 12:27:24 -0600 |
commit | 44cc53902935c693239611b06de02fc37ac4da62 (patch) | |
tree | 278cbbf8071e33776a3dfbfe484084136e6f791d /plugins/fzf/fzf.plugin.zsh | |
parent | 8620d4004c3391fa4f624ebf500eef8bcf32a52e (diff) | |
parent | 3667f94538c24ebaa9abd46e797a2610f3b67c5e (diff) | |
download | zsh-44cc53902935c693239611b06de02fc37ac4da62.tar.gz zsh-44cc53902935c693239611b06de02fc37ac4da62.tar.bz2 zsh-44cc53902935c693239611b06de02fc37ac4da62.zip |
Merge remote-tracking branch 'origin/master' into master
Diffstat (limited to 'plugins/fzf/fzf.plugin.zsh')
-rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 53bdcbc97..0b831b7f7 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -98,3 +98,13 @@ function indicate_error() { setup_using_debian_package || setup_using_base_dir || indicate_error unset -f setup_using_debian_package setup_using_base_dir indicate_error + +if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then + if (( $+commands[rg] )); then + export FZF_DEFAULT_COMMAND='rg --files --hidden' + elif (( $+commands[fd] )); then + export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git' + elif (( $+commands[ag] )); then + export FZF_DEFAULT_COMMAND='ag -l --hidden -g ""' + fi +fi |