use crate::config::Config; use structopt::StructOpt; use std::path::PathBuf; #[derive(Debug, Clone, StructOpt)] pub(crate) struct Cli { #[structopt(long, short, parse(from_occurrences))] pub(crate) verbosity: u8, #[structopt(long, number_of_values = 1, parse(try_from_str = shell_words::split))] pub(crate) extra_arg: Vec>, #[structopt(long, short = "C", default_value = ".")] pub(crate) directory: PathBuf, #[structopt(subcommand)] pub(crate) command: Command, #[structopt(flatten)] pub(crate) common_options: Config, } #[derive(Debug, Clone, StructOpt)] pub(crate) enum Command { Generate { file: String }, Config { #[structopt(subcommand)] command: ConfigCommand, } } #[derive(Debug, Clone, StructOpt)] pub(crate) enum ConfigCommand { Default, Show, }