feat: add short aliases for CLI subcommands#150
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🎉 All unit tests passed! ✅ |
There was a problem hiding this comment.
Code Review
This pull request introduces short aliases for CLI commands (r, c, a, p) by updating the clap configuration in src/cli.rs and documenting them in the README.md. The review feedback suggests using the modern 'command' attribute instead of 'clap' for consistency with v4 idioms and recommends restructuring the README examples to improve copy-paste usability by avoiding inline comments.
| #[derive(Subcommand)] | ||
| enum Command { | ||
| /// List all repositories | ||
| #[clap(visible_alias = "r")] |
There was a problem hiding this comment.
| #[clap(visible_alias = "r")] | ||
| Repos, | ||
| /// Clone repositories | ||
| #[clap(visible_alias = "c")] |
| #[clap(visible_alias = "c")] | ||
| Clone, | ||
| /// Clone all repositories | ||
| #[clap(visible_alias = "a")] |
| #[clap(visible_alias = "a")] | ||
| All, | ||
| /// Show open pull requests | ||
| #[clap(visible_alias = "p")] |
| ### List all repositories | ||
| ```sh | ||
| hoc repos | ||
| hoc repos # or hoc r |
There was a problem hiding this comment.
| ### 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Summary
rfor therepossubcommandcfor theclonesubcommandafor theallsubcommandpfor theprsubcommand🔧 Type of Change
Note
Low Risk
Low risk: adds Clap
visible_aliases for existing subcommands and updates documentation, without changing command execution logic.Overview
Adds single-letter
clapvisible_aliases for therepos,clone,all, andprsubcommands so users can runhoc r/c/a/p.Updates
README.mdusage examples to document the new short forms alongside the existing commands.Reviewed by Cursor Bugbot for commit 4175bb1. Bugbot is set up for automated code reviews on this repo. Configure here.