Re:Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift ...
by bhaak on Thursday November 30, 2023 @10:49AM
(#38474953)
As I have overloaded my rg with a customized rg alias, I can't pipe multiple rg calls.
Otherwise it would look like this:
# rg nokogiri | rg linux
<stdin>:11:Gemfile.lock:647: nokogiri (1.15.5-x86_64-linux)
But that is a me problem.The workaround is of course just to pipe into grep instead.
Re:Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift ...
by burntsushi on Thursday November 30, 2023 @10:56AM
(#38475040)
Or `\rg`, which will use the command directly and skip your alias.
The standard way to run "AND" queries is through shell pipelines. That is, `rg foo | rg bar` will only print lines containing both. But composition usually comes with costs. The output reverts to the standard grep format and it doesn't interact nicely with contextual options like -C/--context.
See: https://github.com/BurntSushi/ripgrep/issues/875