Add subcommand aliases

This commit is contained in:
Joscha 2025-05-03 01:01:04 +02:00
parent 1ed358a0b2
commit 19c53e0ee8
2 changed files with 12 additions and 0 deletions

View file

@ -8,9 +8,14 @@ mod tidy;
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
pub enum Command { pub enum Command {
#[command(visible_alias = "s")]
Status(status::Command), Status(status::Command),
#[command(visible_alias = "t")]
Tidy(tidy::Command), Tidy(tidy::Command),
#[command(subcommand)] #[command(subcommand)]
#[command(visible_alias = "r")]
Repo(repo::Command), Repo(repo::Command),
} }

View file

@ -10,9 +10,16 @@ use crate::Environment;
/// Perform repo operations. /// Perform repo operations.
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
pub enum Command { pub enum Command {
#[command(visible_alias = "l")]
List(list::Command), List(list::Command),
#[command(visible_alias = "s")]
Show(show::Command), Show(show::Command),
#[command(visible_alias = "a")]
Add(add::Command), Add(add::Command),
#[command(visible_alias = "r")]
Remove(remove::Command), Remove(remove::Command),
} }