replace-in-files-cli
replace-in-files-cli copied to clipboard
Add dry run option
If the dry run option is set, then no changes should happen, instead it should list all changes that would happen.
Can you show an example of how that would look like? How would it list the changes?
@sindresorhus I imagine sth like ripgrep is best; You can then show the replacement in another color. (I suggest using background colors, too.) This dryrun feature is essential for a calm replacement :D.

@NightMachinary I like it 👍
This dryrun feature is essential for a calm replacement :D.
Sure. However, this CLI is really meant to be used in run scripts of packages/apps, where you're already using Git, so you can always just revert the commit / working directory if you did something wrong.
Yup, I also like @NightMachinary proposal. Maybe one could also add a interactive mode, where the user has to confirm (y/n) each replacement.