-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Extend --replace #1591
Comments
I don't know about the
|
I'm not sure I understand the problem here. @NightMachinary Could you please provide a more detailed example with inputs and outputs? (But yeah, I am unlikely to add an |
@okdana That |
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 acut -d: -f1
andcut -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'
.The text was updated successfully, but these errors were encountered: