From 19c53e0ee8c4be63b06f6b44449de7fb655da1fc Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 3 May 2025 01:01:04 +0200 Subject: [PATCH] Add subcommand aliases --- gdn-cli/src/commands.rs | 5 +++++ gdn-cli/src/commands/repo.rs | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gdn-cli/src/commands.rs b/gdn-cli/src/commands.rs index 7ff1f0f..097b823 100644 --- a/gdn-cli/src/commands.rs +++ b/gdn-cli/src/commands.rs @@ -8,9 +8,14 @@ mod tidy; #[derive(Debug, Parser)] pub enum Command { + #[command(visible_alias = "s")] Status(status::Command), + + #[command(visible_alias = "t")] Tidy(tidy::Command), + #[command(subcommand)] + #[command(visible_alias = "r")] Repo(repo::Command), } diff --git a/gdn-cli/src/commands/repo.rs b/gdn-cli/src/commands/repo.rs index 5d7ec7a..119e041 100644 --- a/gdn-cli/src/commands/repo.rs +++ b/gdn-cli/src/commands/repo.rs @@ -10,9 +10,16 @@ use crate::Environment; /// Perform repo operations. #[derive(Debug, Parser)] pub enum Command { + #[command(visible_alias = "l")] List(list::Command), + + #[command(visible_alias = "s")] Show(show::Command), + + #[command(visible_alias = "a")] Add(add::Command), + + #[command(visible_alias = "r")] Remove(remove::Command), }