1 2 3 4 5 6 7 8 9 10 11 12 13 14
use clap::{Arg, ArgAction}; pub struct Yes(pub bool); impl Yes { pub fn arg() -> Arg { Arg::new("yes") .short('y') .long("yes") .help("Answer yes to all prompts") .action(ArgAction::SetTrue) .global(true) } }