summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
blob: e106de7006d40bd2b583ab4eeaa4eb6dce811bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use structopt::StructOpt;

#[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<Vec<String>>,

    #[structopt(subcommand)]
    pub(crate) command: Command,
}

#[derive(Debug, Clone, StructOpt)]
pub(crate) enum Command {
    Generate { file: String },
}