2021-07-13 12:50:55 -05:00
|
|
|
use clap::Parser;
|
2020-04-30 20:20:21 +03:00
|
|
|
|
2021-07-13 12:50:55 -05:00
|
|
|
#[derive(Parser, Debug)]
|
2020-04-30 20:20:21 +03:00
|
|
|
struct Opt {
|
2022-09-02 14:20:39 -05:00
|
|
|
#[command(subcommand)]
|
2020-04-30 20:20:21 +03:00
|
|
|
cmd: Command,
|
|
|
|
}
|
|
|
|
|
2021-07-13 12:50:55 -05:00
|
|
|
#[derive(Parser, Debug)]
|
2020-04-30 20:20:21 +03:00
|
|
|
enum Command {
|
2022-09-02 14:20:39 -05:00
|
|
|
#[command(external_subcommand)]
|
2020-04-30 20:20:21 +03:00
|
|
|
Run(Vec<String>),
|
|
|
|
|
2022-09-02 14:20:39 -05:00
|
|
|
#[command(external_subcommand)]
|
2020-04-30 20:20:21 +03:00
|
|
|
Other(Vec<String>),
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let opt = Opt::parse();
|
2023-05-04 15:53:36 -04:00
|
|
|
println!("{opt:?}");
|
2020-04-30 20:20:21 +03:00
|
|
|
}
|