use std::path::PathBuf;
use clap::{Parser, Subcommand, ValueEnum};
use clap_complete::Shell;
#[derive(Debug, Clone, Parser)]
#[command(author, version, about)]
pub struct Cli {
#[arg(global(true), short, long, default_value = PathBuf::from("main.august").into_os_string())]
pub script: PathBuf,
#[arg(global(true), short, long)]
pub verbose: bool,
#[arg(global(true), short, long)]
pub quiet: bool,
#[arg(global(true), long, value_enum, default_value_t, alias("color"))]
pub colour: ColourSupport,
#[command(subcommand)]
pub subcommand: CLICommand,
}
#[derive(Debug, Clone, Subcommand)]
pub enum CLICommand {
Info,
Inspect,
Check,
Completions { shell: Shell },
Build,
Test,
Run { unit: String },
}
#[derive(Debug, Clone, Copy, Default, ValueEnum)]
pub enum ColourSupport {
Always,
#[default]
Auto,
Never,
}