diff options
| author | Max Audron <audron@cocaine.farm> | 2022-06-07 12:28:18 +0200 |
|---|---|---|
| committer | Maximilian Manz <maximilian.manz@de.clara.net> | 2022-06-20 11:33:04 +0200 |
| commit | dc8056cbf2d6ee54695171fefcbf26621ea2251e (patch) | |
| tree | 6c15e8567ad709f0395131b935e777cf4ede2b21 /src/config/args.rs | |
| parent | init (diff) | |
replace structopt with clap 3
Diffstat (limited to 'src/config/args.rs')
| -rw-r--r-- | src/config/args.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/config/args.rs b/src/config/args.rs index 1b0683d..9c0973f 100644 --- a/src/config/args.rs +++ b/src/config/args.rs @@ -1,18 +1,21 @@ -use structopt::StructOpt; +use clap::{Parser, Subcommand, ArgEnum}; -#[derive(StructOpt, Clone, Debug)] +#[derive(Parser, Clone, Debug)] +#[clap( + override_usage("gtree <SUBCOMMAND> [SCOPE]") +)] /// Sync Gitlab Trees pub struct Args { - #[structopt(subcommand)] + #[clap(subcommand)] pub command: Commands, /// Only operate on this subtree + #[clap(global = true)] pub scope: Option<String>, } #[derive(PartialEq, Clone, Debug)] -#[derive(StructOpt)] -#[structopt(about = "the stupid content tracker")] +#[derive(Subcommand)] pub enum Commands { /// Download new repositories and delete old ones, also update Sync, |
