I’m stuck with rg right now because it’s the only ine which correctly handles gitignore files. Generally quite happy with it but I wish it could also use a more powerful regex engine for some less common cases. Most annoying thing is that $ does not work with windows newlines.
Have you tried sift? https://sift-tool.org/
Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
61–70 of 101 posts
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#62A nice feature of ag is the ability to limit the search to a certain file type. E.g. to only search ruby files: ag --ruby foo . To see a list of supported types and the matching file extensions: ag --list-file-types . Just checked and rg does have something similar, but you need to specify the type as an argument to a flag: rg --type ruby foo .
You can shorten it with -t: -tc, -tphp, -truby, -tsh. Then it's actually the same amount of characters as with ag.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#63Any modern tools like this? sary - a suffix array library and tools http://sary.sourceforge.net/ It finds words in O(log(n)) time by using an additional index.
Typically, if you want an index, you build an inverted index, which maps terms (e.g., n-grams or tokens in your favorite PL) to a postings list. The postings list contains all of the documents in which that term occurs.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#64> Limit directory search depth
These could be the same item, the former is a special case of the latter.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#65This chart doesn't compare speed. Until rg, I didn't grep much because I generally search through a lot of files. rg cuts through them in no time.
The `sift` [1] tool presents a performance comparison, but not against `rg`. [1] https://sift-tool.org/performance
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#66switched from ag to rg a few months ago and have nothing but good things to say about the experience.
I switched also recently, the thing that helped me was adding this: alias rg='rg -S' to my .bashrc so that rg had the same default case sensitivity as ag.
I understand alias'es and wrappers fine, but I like having the environment have some way to contribute. It's just my simple preference.
There's also the related #314 which makes even more sense- per project configuration. Sure would be great being able to download a project & have it already setup nicely for ripgrep! https://github.com/BurntSushi/ripgrep/issues/314
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#67Seems everybody here has switched to rg but I haven't because it's not available in Debian repos (yet) unlike ack/ag. So, do such folks use Arch or just download a pre-built binary ? How about updating rg when a new version is out ?
Edit: the "-f" in the "cargo install" command is for updating; without the -f, it refuses to install over an already installed version. The first time you install, you can omit the -f.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#68Earlier quoted context omitted.
Same here. Ripgrep works like a charm Ack requires Perl, which I am not going to install just for that purpose.
What kind of OS are you running that Perl isn't installed already?
Like, platonic ideal- because it doesn't exist. That greatly ideal.
I don't know why I care, other than even the super cut down perl being a sizable % of the install size for some of the very small systems I've worked with.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#69Earlier quoted context omitted.
You can shorten it with -t: -tc, -tphp, -truby, -tsh. Then it's actually the same amount of characters as with ag.
And has the advantage of being pluggable rather than a hard-coded list of file types (though IIRC ack has a configuration file whereas with rg you need to use an alias to set up new types for every invocation).
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#70Earlier quoted context omitted.
Emphasis mine- Excerpt: "Some might say that ag and ripgrep and any of the other tools I list on beyondgrep.com are competing projects, but I think that way of thinking is wrong. It’s only a competition if you see it as a competition. I’m not competing against anyone for anything: Clicks, dollars, popularity, etc. If someone uses ripgrep instead of ack, it doesn’t hurt me. It’s the difference between an abundance vs.…
What is woo-woo space?