oxidecomputer / oxidecomputer/oxide.rs
consider short codes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 75
- Forks
- 21
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Currently all subcommands name their arguments with long-form CLI options e.g. --name NAME. It can be convenient for interactive use to have short options e.g. -n NAME. We could implement this by, say, defining some CLI-wide short codes (e.g. name -> n and description -> D) and then walking the clap::Command tree to add those short codes for any matching long options. There are some pros and cons:
Short options require less typing for users.
Conversely long options are more explicit and more evident in both command history and in shell scripts. The options map directly to the API which makes programmatic automation a simpler translation. They're less error-prone as people are less likely to be confused. Autocomplete can mitigate the typing penalty of long options.
cc: @leftwo
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CLI's clap::Command tree and existing long-option definitions. Evaluate the proposed CLI-wide mappings such as name -> n and description -> D against the stated typing, explicitness, scripting, and autocomplete trade-offs; done means the short-option policy and its scope are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100