aboutsummaryrefslogtreecommitdiff
path: root/src/args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs
index aeedfe6..91bddc5 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -117,6 +117,8 @@ Command! {Command, [
Encrypted(EncryptedArgs) => |ctx, args: EncryptedArgs| args.subcmd.execute(ctx),
/// Interacts with the device's hidden volume
Hidden(HiddenArgs) => |ctx, args: HiddenArgs| args.subcmd.execute(ctx),
+ /// Lists the attached Nitrokey devices
+ List(ListArgs) => |ctx, args: ListArgs| commands::list(ctx, args.no_connect),
/// Locks the connected Nitrokey device
Lock => commands::lock,
/// Accesses one-time passwords
@@ -264,6 +266,13 @@ struct HiddenCreateArgs {
}
#[derive(Debug, PartialEq, structopt::StructOpt)]
+struct ListArgs {
+ /// Only print the information that is available without connecting to a device
+ #[structopt(short, long)]
+ no_connect: bool,
+}
+
+#[derive(Debug, PartialEq, structopt::StructOpt)]
struct OtpArgs {
#[structopt(subcommand)]
subcmd: OtpCommand,