From e8b83d41cb2a454045d52499e442d0c1a0f3be28 Mon Sep 17 00:00:00 2001 From: Niklas Elsbrock Date: Sun, 10 May 2026 17:34:56 +0200 Subject: [PATCH] make small improvements to CLI - set meaningful value names for options - add backticks around CLI options in user-facing messages --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7c2fc27..b2b457d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ struct Args { status: StatusEnabled, /// Stop once the specified number of matching keys has been found. - #[arg(long)] + #[arg(long, value_name = "NUM")] stop_after: Option>, /// Prompt for a password and use it to encrypt matching keys. @@ -55,7 +55,7 @@ struct Args { /// /// If not specified, the amount of worker threads will be set to the amount of the machine's /// available parallelism. - #[arg(long)] + #[arg(long, value_name = "NUM")] workers: Option>, } @@ -84,7 +84,7 @@ fn main() -> anyhow::Result<()> { eprintln!( "WARNING: No user ID was provided.\n\ You may experience problems importing generated keys into GnuPG.\n\ - Use the --userid option to add a user ID.\n" + Use `--userid ` to add a user ID.\n" ) } @@ -112,7 +112,7 @@ fn main() -> anyhow::Result<()> { Some(workers) => workers, None => std::thread::available_parallelism().context( "unable to determine available parallelism, \ - use --workers to specify amount of worker threads", + use `--workers ` to specify amount of worker threads", )?, };