Hacker News new | ask | show | jobs
by enriquto 1339 days ago
> it defaults to parsing a git tree's gitignore file and skipping over files listed in it

Is that true? How could anybody think that this non-orthogonal monstrosity would make any sense?

4 comments

That monstrosity is easily one of the two most popular reasons cited by folks as being the reason why they use/like ripgrep. (With the other reason being performance.)

Orthogality is a means to an end, not an end itself.

because it suits the pragmatic 90% case and not some "what if" scenario. It has quite adequately outlined what files it does search and also how to overcome the defaults. If you use CLI you can use --help as well and get the other options.
It's the correct default for me. I don't want to grep heinous output files by default, like my gigabytes of generated KML files. I appreciate that rg (and ag) ignores those files by default, and 90% of the people I show it to agree.
Because you hardly ever want to grep through your build artifacts or node modules? I don’t remember any one time I had to explicitly tell ripgrep to search through all the files in a repository
Ah, someone who hasn't experienced the... experience of working on a project that does very esoteric autotools magic.

I will agree that in a sane project setup you don't need to search through all files including build artifacts ignored by git.

Even in an insane setup you generally don't want to search both at once. I find the pattern of first grepping non-ignored files and then cd-ing into my build directory or whatever and rerunning more helpful anyway.
It’s what you usually want when searching code bases. It includes all your source code but excludes generated code and build artefacts.