your-tools / ruplacer

Find and replace text in source files
BSD 3-Clause "New" or "Revised" License
443 stars 25 forks source link

Feature request : add 'quiet' option #87

Closed kpym closed 2 years ago

kpym commented 2 years ago

It will be nice to have -q/--quiet option to use in conjunction with --go. Or may be --qgo (for "quiet go").

dmerejkowsky commented 2 years ago

I prefer a separate --quiet argument - this is consistent with many other tools.

Do you want to try and submit a patch ?

kpym commented 2 years ago

@dmerejkowsky I would love to, but rust is not part of my skill set, sorry. 😳

dmerejkowsky commented 2 years ago

Well, turned out it was a bit more difficult than I though it would be.

Also, fun fact, while working on this feature I messed up my working copy by running ruplacer --go --quiet with the wrong folder. So ... be careful with the combination of the two options ;)

dmerejkowsky commented 2 years ago

Anyhow, this has been implement in the 0.7.0 release. Enjoy!

kpym commented 2 years ago

Thanks for considering this and do it so quickly. 🙏 I was thinking that this will be as simple to replace stdout by null and keep stderr as is... but it is never as simple as we think. 😉