From 4175bb1e29574f5060e20d36e4b659c49ab20aaf Mon Sep 17 00:00:00 2001 From: joaolfp Date: Thu, 7 May 2026 00:14:38 -0300 Subject: [PATCH] feat: add short aliases for CLI subcommands Co-Authored-By: Claude Sonnet 4.6 --- README.md | 8 ++++---- src/cli.rs | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8c89ab3..875744a 100644 --- a/README.md +++ b/README.md @@ -15,22 +15,22 @@ cargo install --git https://github.com/heroesofcode/heroesofcode-git ### List all repositories ```sh -hoc repos +hoc repos # or hoc r ``` ### Clone repositories interactively ```sh -hoc clone +hoc clone # or hoc c ``` ### Clone all repositories ```sh -hoc all +hoc all # or hoc a ``` ### Show open pull requests ```sh -hoc pr +hoc pr # or hoc p ``` ### Help diff --git a/src/cli.rs b/src/cli.rs index 3ff24a0..7d24d6d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -15,12 +15,16 @@ struct Args { #[derive(Subcommand)] enum Command { /// List all repositories + #[clap(visible_alias = "r")] Repos, /// Clone repositories + #[clap(visible_alias = "c")] Clone, /// Clone all repositories + #[clap(visible_alias = "a")] All, /// Show open pull requests + #[clap(visible_alias = "p")] Pr, }