by setopt · 2y ago · 0 comments
ripgrep does try to emit a warning if you run `rg foo` and it doesn't search any files because of gitignore. This can happen in some cases, e.g., when you have a `.gitignore` in your `$HOME` with a `*`.
Personally, I love this default and find it way more usable than grep in most cases. It’s a more important feature to me than the per-file search speed, since grep is often fast enough.
Setting up all that with CLI flags is a lot of work for what is arguably a sensible default.
> Setting up all that with CLI flags is a lot of work for what is arguably a sensible default.
alias fd="fd --include-gitignore --include-global-gitignore"
alias rg="rg --include-gitignore --include-global-gitignore"
I would not consider even a long line like this in your shell's config file "a lot of work". In fact, it seems pretty standard.