use clap::{Parser, Subcommand, ValueEnum};
#[derive(Clone, ValueEnum)]
pub enum When {
Auto,
Never,
Always,
}
#[derive(Parser)]
#[command(version, author, about)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
#[arg(value_enum, short = 'C', long = "color", default_value = "auto")]
pub color: When,
}
#[derive(Subcommand)]
pub enum Command {
#[clap(visible_alias = "search")]
Lookup {
word: String,
},
#[command(arg_required_else_help = true)]
Clean {
#[arg(short = 'c', long = "cache")]
cache: bool,
},
Complete {
shell: String,
},
}