Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Is there a dry run mode before the replacement takes place? #20

Open
yangchenyun opened this issue Feb 24, 2013 · 4 comments
Open

Is there a dry run mode before the replacement takes place? #20

yangchenyun opened this issue Feb 24, 2013 · 4 comments

Comments

@yangchenyun
Copy link

It would be scary if the some matches go wrong.

@harthur
Copy link
Owner

harthur commented Feb 24, 2013

--preview or -p to do a dry run. I might change it to show the possible replacements then prompt whether to perform them, what do you think about that?

@yangchenyun
Copy link
Author

You mean start a repl when run the command, and let the user choose to commit the replacement or not?
That would be awesome, like the git interactive add mode. 👍
But I think it deserves a separate switch such as --interactive or -i as the -p mode is still useful for a quick scan.

@harthur
Copy link
Owner

harthur commented Feb 25, 2013

Thanks, I want to do an interactive mode like you were describing, but I was thinking in the meantime at least show all the potential changes at once (like it does now), and ask "do you want to make these changes? [y]n" every time to at least prevent mishaps (I've forgotten the -p flag myself before).

@yangchenyun
Copy link
Author

I think this is useful, but every time seems a bit annoying especially for simple changes.
And as similar programs all have the direct or dry-run mode, so I think it should be user (such as myself)'s responsible to get it right.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants