Skip to content
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

[Feature request] Highlight replacements in dry-run mode. #17

Closed
murlakatamenka opened this issue Jul 29, 2020 · 3 comments · Fixed by #19
Closed

[Feature request] Highlight replacements in dry-run mode. #17

murlakatamenka opened this issue Jul 29, 2020 · 3 comments · Fixed by #19
Labels
enhancement New feature or request

Comments

@murlakatamenka
Copy link

Hi, thanks for rnr!

It would be nice to highlight in color what is replaced with what in a dry-run mode.

Useful cases:

  • files / directories with long names (surely human brain parses colors way faster than long symbol sequences, and then you also need to diff both paths!)
  • replacement occurs multiple times

That's how ripgrep highlights found matches by default, for instance (rg fn):

image

Or another toy example (echo barfoobar | rg bar --replace baz):
image

What do you think?

@ismaelgv
Copy link
Owner

Yes, this would be a nice addition to rnr. I will take a look at this feature to include it in the next release. Thanks for the feedback!

@ismaelgv ismaelgv added the enhancement New feature or request label Jul 29, 2020
@ismaelgv
Copy link
Owner

ismaelgv commented Jul 31, 2020

I added the diff feature in the colored version of the output. It is currently in master but I will include it in the next release.

@murlakatamenka
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants