holmgr / cargo-sweep

A cargo subcommand for cleaning up unused build files generated by Cargo
MIT License
693 stars 31 forks source link

Various flags lack long forms #47

Closed chris-morgan closed 1 year ago

chris-morgan commented 3 years ago

All three of these long forms are well-established conventions. Amusingly, their short forms are actually not quite so universal. --dry-run is normally -n (for “no action”, I imagine; this is probably worth changing, though of course it’s a breaking change) or may even lack a short form, and --recursive and --verbose are occasionally capitalised where the lowercase was already used for something else (e.g. -v for --version).

I give this as a rule of thumb for CLI design: always start with a long form, and then consider whether to add a short form, erring on the side of not doing so.

holmgr commented 3 years ago

Very good points. Perhaps a good way forward would be to redefine what the flags ideally should be. Then either choose to do a breaking change and update the major version, or to add the "correct flags" where possible and give deprecation warnings for those flags which are problematic and for now only release a minor version after implementing the changes. Thoughts?