cargo-sweep icon indicating copy to clipboard operation
cargo-sweep copied to clipboard

Various flags lack long forms

Open chris-morgan opened this issue 3 years ago • 1 comments

  • -d should have --dry-run
  • -r should have --recursive
  • -v should have --verbose

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.

chris-morgan avatar Oct 22 '20 07:10 chris-morgan

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?

holmgr avatar Oct 23 '20 19:10 holmgr