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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user