5 ms·
> 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 monst
by enriquto 4y 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?
- nicoburns 4y agoIt’s what you usually want when searching code bases. It includes all your source code but excludes generated code and build artefacts.
- nrabulinski 4y agoBecause 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
- tmtvl 4y agoAh, 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.
- iudqnolq 4y agoEven 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.
- cptroot 4y agoIt'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.
- burntsushi 4y agoThat 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.
- stjohnswarts 4y agobecause 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.