3 ms·
> ignores files matching .gitignore Maybe it's just me, but that sounds like a bad default. I can definitely imagine people being confused by that.
by ainar-g 7y ago
> ignores files matching .gitignore
Maybe it's just me, but that sounds like a bad default. I can
definitely imagine people being confused by that.
- choeger 7y agoIt is. At first. But you get used to it quite fast. In my experience, when I have a .gitignore I either want to grep the ignored stuff or the rest, never both. So I notice quite early that something is odd, when rg reports nothing at all.
- Terr_ 7y agoA problem-scenario that comes to mind involves "set your own" config files, like when a codebase has a config.xml.dist and you're supposed to copy and customize it to config.xml which should never get checked in.
- burntsushi 7y agoThey are. That's why it's always mentioned in the first few sentences of docs (man page, --help, README). With that said, this default is one of ripgrep's defining features and is something that users consistently report as one of their favorite things about ripgrep. You can disable all smart filtering (gitignore, hidden, binary) with `rg -uuu foo`. That will search the same stuff that `grep -r foo ./` will.
- dmurray 7y agoIt's less confusing if you think of it as a code search tool, rather a text search tool. Though now I realise how useful I would find this feature.