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

Add dry run option #1

Open
madnight opened this issue Jun 17, 2019 · 4 comments
Open

Add dry run option #1

madnight opened this issue Jun 17, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@madnight
Copy link

If the dry run option is set, then no changes should happen, instead it should list all changes that would happen.

@sindresorhus
Copy link
Owner

Can you show an example of how that would look like? How would it list the changes?

@NightMachinery
Copy link

@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.
image

@sindresorhus
Copy link
Owner

@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.

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Apr 16, 2020
@madnight
Copy link
Author

madnight commented Jun 3, 2020

Yup, I also like @NightMachinary proposal. Maybe one could also add a interactive mode, where the user has to confirm (y/n) each replacement.

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

No branches or pull requests

3 participants