Skip to content

Commit 5fd8e5a

Browse files
committed
clap no longer reorders alphabetically automatically
1 parent f45ad49 commit 5fd8e5a

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bin/solo2/cli.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ pub struct GlobalOptions {
5858
pub enum Subcommands {
5959
#[clap(subcommand)]
6060
App(Apps),
61-
#[clap(subcommand)]
62-
Pki(Pki),
6361

6462
#[clap(subcommand)]
6563
Bootloader(Bootloader),
@@ -71,6 +69,9 @@ pub enum Subcommands {
7169
#[clap(visible_alias = "ls")]
7270
List,
7371

72+
#[clap(subcommand)]
73+
Pki(Pki),
74+
7475
/// Update to latest firmware published by SoloKeys. Warns on Major updates.
7576
Update {
7677
/// Just show the version that would be installed
@@ -91,8 +92,6 @@ pub enum Subcommands {
9192
#[derive(Subcommand)]
9293
/// Interact with bootloader
9394
pub enum Bootloader {
94-
/// Reboots (into device if firmware is valid)
95-
Reboot,
9695
/// List all available bootloaders
9796
#[clap(visible_alias = "ls")]
9897
List,
@@ -104,6 +103,8 @@ pub enum Bootloader {
104103
// /// Configuration file containing settings
105104
// config: String,
106105
// },
106+
/// Reboots (into device if firmware is valid)
107+
Reboot,
107108
}
108109

109110
#[derive(Subcommand)]
@@ -178,14 +179,14 @@ pub enum Apps {
178179
pub enum Admin {
179180
/// Print the application's AID
180181
Aid,
181-
/// Reboot device (as Solo 2)
182-
#[clap(alias = "reboot")]
183-
Restart,
182+
/// Is device locked? (not available in early firmware)
183+
Locked,
184184
/// Switch device to maintenance mode (reboot into LPC 55 bootloader)
185185
#[clap(alias = "boot-to-bootrom")]
186186
Maintenance,
187-
/// Is device locked? (not available in early firmware)
188-
Locked,
187+
/// Reboot device (as Solo 2)
188+
#[clap(alias = "reboot")]
189+
Restart,
189190
/// Return device UUID (not available over CTAP in early firmware)
190191
Uuid,
191192
/// Return device firmware version
@@ -222,8 +223,6 @@ pub enum Ndef {
222223
pub enum Oath {
223224
/// Print the application's AID
224225
Aid,
225-
/// Register new credential
226-
Register(OathRegister),
227226
// Authenticate,
228227
/// Delete existing credential
229228
Delete {
@@ -232,6 +231,8 @@ pub enum Oath {
232231
},
233232
/// List all credentials
234233
List,
234+
/// Register new credential
235+
Register(OathRegister),
235236
/// Reset OATH app, deleting all credentials
236237
Reset,
237238
/// Calculate TOTP for a registered credential

0 commit comments

Comments
 (0)