diff --git a/src/shapes/circle/command.rs b/src/shapes/circle/command.rs index 13d2a35..7203875 100644 --- a/src/shapes/circle/command.rs +++ b/src/shapes/circle/command.rs @@ -1,7 +1,7 @@ use clap::Parser; #[derive(Parser)] -#[command(about="Mathematical operations with circles", long_about = None)] +#[command(about="Mathematical operations with circles", long_about = None, arg_required_else_help=true)] pub struct Command { #[arg(short, long, help = "Sets the radius of the circle | e.g. -r 5")] pub radius: f64, diff --git a/src/shapes/rhombus/command.rs b/src/shapes/rhombus/command.rs index 8d41219..b144761 100644 --- a/src/shapes/rhombus/command.rs +++ b/src/shapes/rhombus/command.rs @@ -1,7 +1,7 @@ use clap::Parser; #[derive(Parser)] -#[command(about="Mathematical operations with rhombus", long_about = None)] +#[command(about="Mathematical operations with rhombus", long_about = None, arg_required_else_help=true)] pub struct Command { #[arg( short = 'l', diff --git a/src/shapes/square/command.rs b/src/shapes/square/command.rs index ff96cb3..8ce6091 100644 --- a/src/shapes/square/command.rs +++ b/src/shapes/square/command.rs @@ -1,7 +1,7 @@ use clap::Parser; #[derive(Parser)] -#[command(about="Mathematical operations with squares", long_about = None)] +#[command(about="Mathematical operations with squares", long_about = None, arg_required_else_help=true)] pub struct Command { #[arg(short, long, help = "Sets the Base of the square | e.g. -b 5")] pub base: i32, diff --git a/src/shapes/trapezoid/command.rs b/src/shapes/trapezoid/command.rs index 9fad3e5..617bb4b 100644 --- a/src/shapes/trapezoid/command.rs +++ b/src/shapes/trapezoid/command.rs @@ -1,7 +1,7 @@ use clap::Parser; #[derive(Parser)] -#[command(about="Mathematical operations with trapezoids", long_about = None)] +#[command(about="Mathematical operations with trapezoids", long_about = None, arg_required_else_help=true)] pub struct Command { #[arg( short = 'l', diff --git a/src/shapes/triangle/command.rs b/src/shapes/triangle/command.rs index 71f40b7..d59ebab 100644 --- a/src/shapes/triangle/command.rs +++ b/src/shapes/triangle/command.rs @@ -1,7 +1,7 @@ use clap::Parser; #[derive(Parser)] -#[command(about="Mathematical operations with triangles", long_about = None)] +#[command(about="Mathematical operations with triangles", long_about = None, arg_required_else_help=true)] pub struct Command { #[arg(short, long, help = "Sets the Base of the triangle | e.g. -b 5")] pub base: Option,