diff options
author | Elyézer Rezende <elyezermr@gmail.com> | 2020-11-09 06:09:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 12:09:10 +0100 |
commit | fa780867d9745bfbd6c190859645d4c92405d961 (patch) | |
tree | dff6f5ca9df497fc6778dff6b30852bf6f082078 | |
parent | 28ed2880c766eb5a360354fb71d597dbc07abaa0 (diff) | |
download | zsh-fa780867d9745bfbd6c190859645d4c92405d961.tar.gz zsh-fa780867d9745bfbd6c190859645d4c92405d961.tar.bz2 zsh-fa780867d9745bfbd6c190859645d4c92405d961.zip |
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.
-rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 4 |
1 files 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 |