use {
clap::{CommandFactory, Parser},
};
#[derive(Parser, Debug)]
#[command(name = "wao", author, version, about, disable_help_flag = true)]
struct Args {
#[arg(long)]
help: bool,
#[arg(short, long, default_value = "9")]
height: u16,
#[arg(short, long, default_value = "3")]
width: u16,
pub root: Option<std::path::PathBuf>,
}
pub fn print_help() {
let mut printer = clap_help::Printer::new(Args::command())
.without("author");
printer
.expander_mut()
.sub("option-lines")
.set("short", "-z")
.set("long", "--zeta")
.set("value", "ZETA")
.set("help", "Set the index of the last letter of the greek alphabet");
printer.print_help();
}
fn main() {
let args = Args::parse();
if args.help {
print_help();
return;
}
let (w, h) = (args.width, args.height);
println!("{w} x {h} = {}", w * h);
}