Comment by BrouteMinou

8 hours ago

For my part, the day I was confused why "grep" couldn't find some files that were obviously there, only to realize that "ripgrep" is ignoring files in the gitignore, that was the day I removed "ripgrep" of my system.

I never asked for such behaviour, and I have no time for pretty "modern" opinions in a base software.

Often, when I read "modern", I read "immature".

I am not ready to replace my stable base utilities for some immature ones having behaviour changes.

The scripts I wrote 5 years ago must work as is.

You did ask for it though. Because ripgrep prominently advertises this default behavior. And it also documents that it isn't a POSIX compatible grep. Which is quite intentional. That's not immature. That's just different design decisions. Maybe it isn't the software you're using that's immature, but your vetting process for installing new tools on your machine that is immature.

Because hey guess what: you can still use grep! So I built something different.

Sounds like the problem you have here is that `grep` is aliased to `ripgrep`. ripgrep isn't intended to be a drop-in replacement for POSIX grep, and the subjectively easier usage of ripgrep can never replace grep's matureness and adoption.

Note: if you want to make ripgrep not do .gitignore filtering, set `RIPGREP_CONFIG_PATH` to point to a config file that contains `-uu`.

Sources:

- https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#c...

- https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#a...

  • So I stand corrected. I did indeed use ripgrep as a drop-in replacement.

    That's on me!

    • I've been playing around with this over the years and this is what I put in my .rgrc:

      --smart-case --no-messages --hidden --ignore-vcs

      and then point to it with

      .zshenv 3:export RIPGREP_CONFIG_PATH="$HOME/.rgrc"

      Not perfect and sometimes I reach for good old fashioned escaped \grep but most of the time it's fine.

The very first paragraph in ripgrep's README makes that behaviour very clear:

> ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files. (To disable all automatic filtering by default, use rg -uuu.)

https://github.com/BurntSushi/ripgrep