-
Notifications
You must be signed in to change notification settings - Fork 8
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
flag
#152
Comments
Thanks for your report! Makes sense, such a flag should exist. I'll look into providing it. It's similar in spirit to #149. In the meantime, you can always not take any action (no replacement etc.), which will enter search mode and print in bold red what was found and would be modified if an action were taken. What's missing is of course showing what the final result looks like. |
Another related nicety is something like the |
Thanks for the pointer, hadn't heard of Let me know if those assumptions are wrong! Always interested in how |
This change adds a new flag `--dry-run` that when given, prevents otherwise destructive file overwrite operations and instead prints a rich diff. The diff contains names of files which would be modified, and a git-like diff of what modifications *would* be made. The diff is human-readable, and not designed to be easily machine-readable. The change leverages the `similar` crate, on which we transitively depended on already anyway. Closes #152.
This change adds a new flag `--dry-run` that when given, prevents otherwise destructive file overwrite operations and instead prints a rich diff. The diff contains names of files which would be modified, and a git-like diff of what modifications *would* be made. The diff is human-readable, and not designed to be easily machine-readable. The change leverages the `similar` crate, on which we transitively depended on already anyway. Closes #152.
This change adds a new flag `--dry-run` that when given, prevents otherwise destructive file overwrite operations and instead prints a rich diff. The diff contains names of files which would be modified, and a git-like diff of what modifications *would* be made. The diff is human-readable, and not designed to be easily machine-readable. The change leverages the `similar` crate, on which we transitively depended on already anyway. Closes #152.
This change adds a new flag `--dry-run` that when given, prevents otherwise destructive file overwrite operations and instead prints a rich diff. The diff contains names of files which would be modified, and a git-like diff of what modifications *would* be made. The diff is human-readable, and not designed to be easily machine-readable. The change leverages the `similar` crate, on which we transitively depended on already anyway. Closes #152.
This change adds a new flag `--dry-run` that when given, prevents otherwise destructive file overwrite operations and instead prints a rich diff. The diff contains names of files which would be modified, and a git-like (word) diff of what modifications *would* be made. The diff is human-readable, and not designed to be easily machine-readable. It leverages the existing search mode. Closes #152.
I just saw your PR - looks good. Thanks!
…On Sun, Nov 3, 2024 at 3:09 PM Alex Povel ***@***.***> wrote:
Closed #152 <#152> as completed
via #156 <#156>.
—
Reply to this email directly, view it on GitHub
<#152 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAE6VYP6OCLRV4K37SIQ3Z6Z7GXAVCNFSM6AAAAABQLLFEGKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGA4TMMRXHA3DINI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
For a tool that can make in-place modifications to many files, it is important to have a
--dry-run
flag. This allows one to see what would be changed without actually performing changes. If this output looks correct, then it can be run "for real".The text was updated successfully, but these errors were encountered: