use argh::FromArgs;
#[derive(FromArgs, PartialEq, Debug)]
#[argh(
description = "{command_name} is a tool to reach new heights.\n\n\
Start exploring new heights:\n\n\
\u{00A0} {command_name} --height 5 jump\n\
",
example = "\
{command_name} --height 5\n\
{command_name} --height 5 j\n\
{command_name} --height 5 --pilot-nickname Wes jump"
)]
struct CliArgs {
#[argh(option)]
height: usize,
#[argh(option)]
pilot_nickname: Option<String>,
#[argh(subcommand)]
command: Command,
}
#[derive(FromArgs, PartialEq, Debug)]
#[argh(subcommand)]
enum Command {
Jump(JumpCmd),
}
#[derive(FromArgs, PartialEq, Debug)]
#[argh(subcommand, name = "jump", short = 'j')]
struct JumpCmd {}
fn main() {
let args: CliArgs = argh::from_env();
println!("{:#?}", args);
}