summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
blob: 30e771ab3e4899bffcc706f7eb390dbf328331e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use clap::{AppSettings, Parser};

// TODO: document

#[derive(Debug, Parser)]
#[clap(setting = AppSettings::InferSubcommands)]
pub struct Cli {
    #[clap(short, long, default_value = "pdbook.toml")]
    pub config: String,
    #[clap(short, long)]
    pub quiet: bool,
    #[clap(short, long, parse(from_occurrences))]
    pub verbose: u8,
    #[clap(subcommand)]
    pub subcommand: SubCommand,
}

#[derive(Debug, Parser)]
pub enum SubCommand {
    Build,
}