diff --git a/src/cli.rs b/src/cli.rs index c6790d2..11e69b9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -5,7 +5,7 @@ use clap_verbosity_flag::{InfoLevel, Verbosity}; /// A simple tool to manage encrypted secrets in YAML files with age encryption #[derive(Parser, Debug)] -#[command(author, version, about, long_about = None, arg_required_else_help = true)] +#[command(author, version, about, long_about = None)] pub struct Cli { /// Generate the completion code for this shell #[arg(long, name = "SHELL")] @@ -15,7 +15,7 @@ pub struct Cli { pub verbose: Verbosity, #[command(subcommand)] - pub command: Option, + pub command: Commands, #[arg(long, hide = true)] pub markdown_help: bool, diff --git a/src/main.rs b/src/main.rs index af0beaf..a3a0d39 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ fn run() -> error::Result<()> { return Ok(()); } - match cli.command.unwrap() { + match cli.command { cli::Commands::Keygen(ref args) => keygen::keygen(args)?, cli::Commands::Pubkey(ref args) => pubkey::pubkey(args)?, cli::Commands::Edit(ref args) => edit::edit(args)?,