oxidecomputer / oxidecomputer/oxide.rs
CLI subcommands displayed by error should be sorted
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 75
- Forks
- 21
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Component
- CLI
- SDK
- Something else
- Not sure
What was the expected behaviour
‣ ./target/debug/oxide system networking bgp
error: 'oxide system networking bgp' requires a subcommand but one was not provided
[subcommands: announce, announce-set, announcement, auth, config, exported, filter, help, history, imported, peer, pref, show-status, status, withdraw]
What is the current behaviour and what actions did you take to get there
‣ ./target/debug/oxide system networking bgp
error: 'oxide system networking bgp' requires a subcommand but one was not provided
[subcommands: config, announce-set, announcement, exported, history, imported, status, show-status, peer, announce, withdraw, filter, auth, pref, help]
CLI or SDK version
‣ ./target/debug/oxide version Oxide CLI 0.14.0+20251008.0.0 Built from commit: 916dc54742d119ee043234ce62615e96ce3cbe61 Oxide API: 20251208.0.0
Operating system
MacOS Tahoe 26.1
Anything else you would like to add?
It's a little inconvenient to read the available subcommands returned by an error (e.g. specifying a command without required arguments) when they are not sorted. It would be a better user experience if these were sorted like they are when using --help.
I'm sure this is likely an artifact of clap, but if it's something that we can help then I think it would be nice (albeit low priority) to do so.
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
Reproduce the missing-subcommand error with oxide system networking bgp, then compare its subcommand order with the output from --help. Inspect the CLI command definitions and the reported clap behavior. Done means the error lists available subcommands in sorted order, matching the help output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100