News for hackers. Stuff that matters.
Re:If you use GNU grep on text files, use the -a (--text) op... by ainar-g on Tuesday April 21, 2020 @02:59PM (#22938186)
> 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.

Re:If you use GNU grep on text files, use the -a (--text) op... by burntsushi on Tuesday April 21, 2020 @05:13PM (#22939386)
They 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.

Re:If you use GNU grep on text files, use the -a (--text) op... by choeger on Tuesday April 21, 2020 @03:02PM (#22938201)
It 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.
Re:If you use GNU grep on text files, use the -a (--text) op... by Terr_ on Tuesday April 21, 2020 @03:12PM (#22938315)
A 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.
Re:If you use GNU grep on text files, use the -a (--text) op... by dmurray on Tuesday April 21, 2020 @07:43PM (#22940509)
It'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.