dictate 0.9.0

CLI utility for looking up words in online dictionary
Documentation
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,

    /// When to use escape sequences
    #[arg(value_enum, short = 'C', long = "color", default_value = "auto")]
    pub color: When,
}

#[derive(Subcommand)]
pub enum Command {
    /// Lookup word in dictionary
    #[clap(visible_alias = "search")]
    Lookup {
        /// Word to lookup
        word: String,
    },

    /// Clean cache, data, or state
    #[command(arg_required_else_help = true)]
    Clean {
        /// Whether to clean cache
        #[arg(short = 'c', long = "cache")]
        cache: bool,
    },

    /// Generate shell completion
    Complete {
        /// Shell to generate completion for
        shell: String,
    },
}