Skip to content

CLI subcommands displayed by error should be sorted #1277

@taspelund

Description

@taspelund

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: 916dc54 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue relating to unexpected behaviour

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions