This 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.
Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
51–60 of 101 posts
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#52Here to plug using `--passthru`/`--passthrough`: it will print all lines, but highlight matches. I often do things like this to watch an output log, but highlight all entries with the string PLUGH in them: tail -F output.log | ag --passthrough '.*PLUGH.*'
The equivalent in grep is '--line-buffered'.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#53I’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.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#54sary - a suffix array library and tools http://sary.sourceforge.net/
It finds words in O(log(n)) time by using an additional index.
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#55Earlier quoted context omitted.
It's almost more useful as a rosetta stone than a feature comparison.
Author here. Yes, that's really what it is. I need to make one that's actually feature comparison more than phrasebook. We're also working on a GNU grep vs. POSIX grep vs. BSD grep phrasebook.
For example, the table could show the blank cell in a different color if it is a default feature, or if it an unsupported feature.
Alternatively, the cell could contain a message such as "(default)".
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#56Earlier quoted context omitted.
Or just use "grep". It is what it's there for. Use --include and --exclude-dirs to do what you describe. (The latter is a good idea to set in your GREP_OPTIONS, unless you actually search .git directories.)
GREP_OPTIONS is deprecated in GNU grep since i think 2.20. It will be removed in a future version, and until then it's going to print an irritating warning message every time you use it. (I don't think there's any such plan for the various BSD greps, so if you use those exclusively you're probably fine.)
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#57Earlier quoted context omitted.
Author here. Yes, that's really what it is. I need to make one that's actually feature comparison more than phrasebook. We're also working on a GNU grep vs. POSIX grep vs. BSD grep phrasebook.
I don't think it would take very much to go from rosetta stone to a more comprehensive feature comparison. For example, the table could show the blank cell in a different color if it is a default feature, or if it an unsupported feature. Alternatively, the cell could contain a message such as "(default)".
Right now we're keeping all the data in a JSON file that we massage into a chart. Massaging it into a true feature comparison chart, along with a rosetta stone, should be a simple matter of programming. Same thing with the GNU/POSIX/BSD rosetta stone we're working on.
https://github.com/beyondgrep/website/blob/dev/comparison.js...
Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#58Re: Feature comparison of ack, ag, git-grep, GNU grep and ripgrep
#59The chart was created by Andy Lester, the creator of ack, who thinks that more open source projects should point to their "competing" projects because it's not really a competition: http://blog.petdance.com/2018/01/02/the-best-open-source-pro...