1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
use crate::config::ProvidedConfig;
use structopt::StructOpt;
use std::path::PathBuf;
#[derive(Debug, Clone, StructOpt)]
#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)]
pub(crate) struct Cli {
#[structopt(long, short, parse(from_occurrences))]
pub(crate) verbosity: u8,
#[structopt(long, short = "C", default_value = ".")]
pub(crate) directory: PathBuf,
#[structopt(subcommand)]
pub(crate) command: Command,
#[structopt(flatten)]
pub(crate) common_options: ProvidedConfig,
}
#[derive(Debug, Clone, StructOpt)]
pub(crate) enum Command {
Generate {
file: Option<String>,
},
Inspect {
file: Option<String>,
},
Config {
#[structopt(subcommand)]
command: ConfigCommand,
},
}
#[derive(Debug, Clone, StructOpt)]
pub(crate) enum ConfigCommand {
Default,
Show,
}
|