2018-07-02 13:41:01 -04:00
|
|
|
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>,
|
|
|
|
// Kevin Knapp (@kbknapp) <kbknapp@gmail.com>, and
|
|
|
|
// Andrew Hobden (@hoverbear) <andrew@hoverbear.org>
|
2017-11-01 21:30:46 +01:00
|
|
|
//
|
2018-02-25 05:22:24 -05:00
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
2018-07-02 13:41:01 -04:00
|
|
|
//
|
|
|
|
// This work was derived from Structopt (https://github.com/TeXitoi/structopt)
|
|
|
|
// commit#ea76fa1b1b273e65e3b0b1046643715b49bec51f which is licensed under the
|
|
|
|
// MIT/Apache 2.0 license.
|
2017-11-01 21:30:46 +01:00
|
|
|
|
|
|
|
mod options {
|
2021-07-13 12:50:55 -05:00
|
|
|
use clap::Parser;
|
2020-01-07 15:47:23 +05:30
|
|
|
|
2021-07-13 12:50:55 -05:00
|
|
|
#[derive(Debug, Parser)]
|
2017-11-01 21:30:46 +01:00
|
|
|
pub struct Options {
|
2018-07-02 15:06:46 -04:00
|
|
|
#[clap(subcommand)]
|
2020-01-07 15:47:23 +05:30
|
|
|
pub subcommand: super::subcommands::SubCommand,
|
2017-11-01 21:30:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod subcommands {
|
2021-10-11 14:48:13 -05:00
|
|
|
use clap::Subcommand;
|
2020-01-07 15:47:23 +05:30
|
|
|
|
2021-10-11 14:48:13 -05:00
|
|
|
#[derive(Debug, Subcommand)]
|
2017-11-01 21:30:46 +01:00
|
|
|
pub enum SubCommand {
|
2020-01-07 15:47:23 +05:30
|
|
|
/// foo
|
2018-05-21 16:54:22 +02:00
|
|
|
Foo {
|
2020-01-07 15:47:23 +05:30
|
|
|
/// foo
|
2021-11-04 10:15:04 -05:00
|
|
|
bars: String,
|
2018-05-21 16:54:22 +02:00
|
|
|
},
|
2017-11-01 21:30:46 +01:00
|
|
|
}
|
|
|
|
}
|