Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




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.


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.


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.


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.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: