use clap::{Parser, Subcommand, ArgEnum}; #[derive(Parser, Clone, Debug)] #[clap( override_usage("gtree [SCOPE]") )] /// Sync Gitlab Trees pub struct Args { #[clap(subcommand)] pub command: Commands, /// Only operate on this subtree #[clap(global = true)] pub scope: Option, } #[derive(PartialEq, Clone, Debug)] #[derive(Subcommand)] pub enum Commands { /// Download new repositories and delete old ones, also update Sync, /// Pull and Push new commits to and from the cloned repos Update, /// List Directories List, }