Skip to content

[FR] Extend --replace #1591

@NightMachinery

Description

@NightMachinery

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docAn issue with or an improvement to documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions