From fa780867d9745bfbd6c190859645d4c92405d961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ely=C3=A9zer=20Rezende?= Date: Mon, 9 Nov 2020 06:09:10 -0500 Subject: [PATCH] fix(fzf): consistently ignore .git directory in `FZF_DEFAULT_COMMAND` (#9421) Be consistent and ignore contents of `.git` directory no matter how FZF_DEFAULT_COMMAND is set. --- plugins/fzf/fzf.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 2f48215d5..524089983 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -154,10 +154,10 @@ unset -f setup_using_opensuse_package setup_using_debian_package setup_using_bas if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then if (( $+commands[rg] )); then - export FZF_DEFAULT_COMMAND='rg --files --hidden' + export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"' 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 ""' + export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git' fi fi