git:ignore: Add /.git

Ignore the .git directory globally instead of ignoring it manually in
tools like fd and ripgrep.

I feel very dumb for putting all this time into the redefinition of :Rg,
especially since I am currently **much** procrastinating writing my
bachelor thesis.
This commit is contained in:
2023-06-23 17:03:29 +02:00
parent 4f5d23bd15
commit 0c4dfbf363
3 changed files with 5 additions and 25 deletions

View File

@@ -106,8 +106,8 @@ FZF_DEFAULT_COMMAND_NO_RG+=" | cut -c3-"
export FZF_DEFAULT_COMMAND_NO_RG
if (( $+commands[rg] )); then
# Prune `.git/` and everything ignored by gitignore(5)
FZF_DEFAULT_COMMAND="rg -L --files -g '!.git'"
# Ignore gitignore(5)d files, see also $XDG_CONFIG_HOME/git/ignore
FZF_DEFAULT_COMMAND="rg -L --files"
else
# Fallback to hardcoding the most important paths to prune
FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND_NO_RG"