From 06701ea7be78ca0d15a278b836a9ee55a8bec3f7 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 3 Apr 2023 22:48:49 +0200 Subject: [PATCH] feat: require subcommand --- crates/biteme/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/biteme/src/main.rs b/crates/biteme/src/main.rs index b588adc..3c9ed95 100644 --- a/crates/biteme/src/main.rs +++ b/crates/biteme/src/main.rs @@ -11,7 +11,12 @@ async fn main() -> eyre::Result<()> { color_eyre::install()?; let cli = clap::Command::new("biteme") - .subcommand(clap::Command::new("generate").subcommand(clap::Command::new("article"))); + .subcommand_required(true) + .subcommand( + clap::Command::new("generate") + .subcommand_required(true) + .subcommand(clap::Command::new("article")), + ); let args = std::env::args();