Skip to content

Color replacements when using --replace #521

@lydell

Description

@lydell

ripgrep colors matches in red (by default). That's very useful.

When using the --replace option, I would find it very useful if the replacements were colored. Currently, nothing is colored (except file paths and line numbers of course).

Here's a screenshot showing what I mean:

screenshot from 2017-06-17 14-21-23

And here's a text sketch:

$ cat test
exponential notation: 123e4
another example: 42e-10
$ rg '(\d+)e' --replace '${1}E' test
1:exponential notation: <color>123E</color>4
2:another example: <color>42E</color>-10

What do you think?

(By the way, thank you very much for ripgrep. It's excellent.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to the functionality of the software.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions