Skip to content

Commit

Permalink
clap no longer reorders alphabetically automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
nickray committed Jan 17, 2023
1 parent f45ad49 commit 5fd8e5a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions src/bin/solo2/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ pub struct GlobalOptions {
pub enum Subcommands {
#[clap(subcommand)]
App(Apps),
#[clap(subcommand)]
Pki(Pki),

#[clap(subcommand)]
Bootloader(Bootloader),
Expand All @@ -71,6 +69,9 @@ pub enum Subcommands {
#[clap(visible_alias = "ls")]
List,

#[clap(subcommand)]
Pki(Pki),

/// Update to latest firmware published by SoloKeys. Warns on Major updates.
Update {
/// Just show the version that would be installed
Expand All @@ -91,8 +92,6 @@ pub enum Subcommands {
#[derive(Subcommand)]
/// Interact with bootloader
pub enum Bootloader {
/// Reboots (into device if firmware is valid)
Reboot,
/// List all available bootloaders
#[clap(visible_alias = "ls")]
List,
Expand All @@ -104,6 +103,8 @@ pub enum Bootloader {
// /// Configuration file containing settings
// config: String,
// },
/// Reboots (into device if firmware is valid)
Reboot,
}

#[derive(Subcommand)]
Expand Down Expand Up @@ -178,14 +179,14 @@ pub enum Apps {
pub enum Admin {
/// Print the application's AID
Aid,
/// Reboot device (as Solo 2)
#[clap(alias = "reboot")]
Restart,
/// Is device locked? (not available in early firmware)
Locked,
/// Switch device to maintenance mode (reboot into LPC 55 bootloader)
#[clap(alias = "boot-to-bootrom")]
Maintenance,
/// Is device locked? (not available in early firmware)
Locked,
/// Reboot device (as Solo 2)
#[clap(alias = "reboot")]
Restart,
/// Return device UUID (not available over CTAP in early firmware)
Uuid,
/// Return device firmware version
Expand Down Expand Up @@ -222,8 +223,6 @@ pub enum Ndef {
pub enum Oath {
/// Print the application's AID
Aid,
/// Register new credential
Register(OathRegister),
// Authenticate,
/// Delete existing credential
Delete {
Expand All @@ -232,6 +231,8 @@ pub enum Oath {
},
/// List all credentials
List,
/// Register new credential
Register(OathRegister),
/// Reset OATH app, deleting all credentials
Reset,
/// Calculate TOTP for a registered credential
Expand Down

0 comments on commit 5fd8e5a

Please sign in to comment.