From a6538455de33f6d09dfa4011fbbdaa6e59b132f4 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 29 Sep 2020 19:18:56 +0200 Subject: Rename numlock, capslock, scrollock options This patch renames the options for the config set command: --numlock ==> --num-lock --capslock ==> --caps-lock --scrolllock ==> --scroll-lock --no-numlock ==> --no-num-lock --no-capslock ==> --no-caps-lock --no-scrolllock ==> --no-scroll-lock The original naming was based on a typo in nitrokey-rs (scrollock vs. scrolllock). Also, the typical spelling for the keys is Num Lock, Caps Lock and Scroll Lock, so using a hyphen is a more natural. --- src/args.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs index a38ca6a..6cf37c8 100644 --- a/src/args.rs +++ b/src/args.rs @@ -125,24 +125,24 @@ Command! {ConfigCommand, [ #[derive(Debug, PartialEq, structopt::StructOpt)] pub struct ConfigSetArgs { - /// Sets the numlock option to the given HOTP slot + /// Sets the Num Lock option to the given HOTP slot #[structopt(short = "n", long)] - pub numlock: Option, - /// Unsets the numlock option - #[structopt(short = "N", long, conflicts_with("numlock"))] - pub no_numlock: bool, - /// Sets the capslock option to the given HOTP slot + pub num_lock: Option, + /// Unsets the Num Lock option + #[structopt(short = "N", long, conflicts_with("num-lock"))] + pub no_num_lock: bool, + /// Sets the Cap Lock option to the given HOTP slot #[structopt(short = "c", long)] - pub capslock: Option, - /// Unsets the capslock option - #[structopt(short = "C", long, conflicts_with("capslock"))] - pub no_capslock: bool, - /// Sets the scrollock option to the given HOTP slot + pub caps_lock: Option, + /// Unsets the Caps Lock option + #[structopt(short = "C", long, conflicts_with("caps-lock"))] + pub no_caps_lock: bool, + /// Sets the Scroll Lock option to the given HOTP slot #[structopt(short = "s", long)] - pub scrollock: Option, - /// Unsets the scrollock option - #[structopt(short = "S", long, conflicts_with("scrollock"))] - pub no_scrollock: bool, + pub scroll_lock: Option, + /// Unsets the Scroll Lock option + #[structopt(short = "S", long, conflicts_with("scroll-lock"))] + pub no_scroll_lock: bool, /// Requires the user PIN to generate one-time passwords #[structopt(short = "o", long)] pub otp_pin: bool, -- cgit v1.2.1