use cote::prelude::*;
#[derive(Debug, Cote, PartialEq, Eq)]
#[cote(help, // Generate help for current struct
aborthelp, // Display help when error raised
name = "app", // Set the usage name
width = 50, // Set the maximum width of option help message
usagew = 3, // Set the maximum count of item in usage
head = "The head message display in help message",
foot = "The foot message display in help message",
)]
pub struct Cli {
debug: bool,
name: String,
foo: Cmd,
bar: Cmd,
#[pos(index = "2")]
arg: String,
#[pos(index = 3..)]
args: Vec<String>,
}
fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
assert!(Cli::parse(Args::from(["app", "--help"])).is_err());
Ok(())
}