ismaelgv / rnr

A command-line tool to batch rename files and directories
MIT License
474 stars 15 forks source link

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

Closed murlakatamenka closed 4 years ago

murlakatamenka commented 4 years ago

Hi, thanks for rnr!

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

Useful cases:

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Awesome, thanks!