I want to both print a highlighted version of the text a la rg --passthru ... and further process matches. Currently this needs two calls of rg. If --replace supported something like $1:$LINE, I could just run a cut -d: -f1 and cut -d: -f2-1 to get the data, with just one rg call. This should perform better if there are lots of non-matching lines? ... Anyways I think it's a good feature to have.
Perhaps a better option is to add --exec that execs a command? Sth in the spirit of --exec 'cp $1 ~/tmp'.
I want to both print a highlighted version of the text a la
rg --passthru ...and further process matches. Currently this needs two calls of rg. If--replacesupported something like$1:$LINE, I could just run acut -d: -f1andcut -d: -f2-1to get the data, with just one rg call. This should perform better if there are lots of non-matching lines? ... Anyways I think it's a good feature to have.Perhaps a better option is to add
--execthat execs a command? Sth in the spirit of--exec 'cp $1 ~/tmp'.