chore(cli): add descriptions to cli

added descriptions to subcommands and args
This commit is contained in:
2026-09-01 18:51:43 -05:00
parent 15013dd8b5
commit a781b75ed6
+12
View File
@@ -15,10 +15,15 @@ pub struct Cli {
#[derive(Debug, Subcommand)] #[derive(Debug, Subcommand)]
pub enum Commands { pub enum Commands {
/// list all profiles
List(ListArgs), List(ListArgs),
/// use a profile
Use(UseArgs), Use(UseArgs),
/// add a profile
Add(AddArgs), Add(AddArgs),
/// remove a profile
Remove(RemoveArgs), Remove(RemoveArgs),
/// show current git user
Current(CurrentArgs), Current(CurrentArgs),
} }
@@ -58,7 +63,9 @@ impl ListArgs {
#[derive(Debug, Args)] #[derive(Debug, Args)]
pub struct UseArgs { pub struct UseArgs {
/// name of the profile to use
pub profile_name: String, pub profile_name: String,
/// whether or not to use it in the global context
#[arg(short, long)] #[arg(short, long)]
pub global: bool, pub global: bool,
} }
@@ -82,9 +89,12 @@ impl UseArgs {
#[derive(Debug, Args)] #[derive(Debug, Args)]
pub struct AddArgs { pub struct AddArgs {
/// name of the profile to add
pub profile_name: String, pub profile_name: String,
/// git user.name
#[arg(long)] #[arg(long)]
pub name: String, pub name: String,
/// git user.email
#[arg(long)] #[arg(long)]
pub email: String, pub email: String,
} }
@@ -110,6 +120,7 @@ impl AddArgs {
#[derive(Debug, Args)] #[derive(Debug, Args)]
pub struct RemoveArgs { pub struct RemoveArgs {
/// name of the profile to remove
pub profile_name: String, pub profile_name: String,
} }
@@ -130,6 +141,7 @@ impl RemoveArgs {
#[derive(Debug, Args)] #[derive(Debug, Args)]
pub struct CurrentArgs { pub struct CurrentArgs {
#[arg(short, long)] #[arg(short, long)]
/// whether or not to use it in the global context
pub global: bool, pub global: bool,
} }