use clap::{Parser, Subcommand};
// An example command-line definition for prototyping
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None, name = "pijul")]
pub struct MockApp {
/// Name of the person to greet
///
/// A longer explanation.
/// This explanation takes up multiple lines!
/// Wow!
#[arg(
short = 'n',
long,
visible_alias = "nom",
alias = "hidden-should-not-appear",
env = "NAME_ENV_VAR"
)]
name: String,
/// Number of times to greet
#[arg(short, long, default_value_t = 1)]
count: u8,
// Subcommand
#[command(subcommand)]
subcommand: Option<Subcmd>,
}
#[derive(Subcommand, Debug, Clone, Copy)]
pub enum Subcmd {
/// First subcommand
///
/// This explanation is also quite long.
/// It takes up multiple lines
One {
#[arg(long)]
times: u32,
},
/// Second subcommand
///
/// Another, even longer explanation.
/// Would it not be crazy
/// if this took up 3 lines??
Two {
#[arg(short = 'a', long)]
amount: i64,
},
}