-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add short aliases for CLI subcommands #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ``` | ||
|
|
||
| ### Clone all repositories | ||
| ```sh | ||
| hoc all | ||
| hoc all # or hoc a | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ``` | ||
|
|
||
| ### Show open pull requests | ||
| ```sh | ||
| hoc pr | ||
| hoc pr # or hoc p | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ``` | ||
|
|
||
| ### Help | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,16 @@ struct Args { | |
| #[derive(Subcommand)] | ||
| enum Command { | ||
| /// List all repositories | ||
| #[clap(visible_alias = "r")] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Repos, | ||
| /// Clone repositories | ||
| #[clap(visible_alias = "c")] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Clone, | ||
| /// Clone all repositories | ||
| #[clap(visible_alias = "a")] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| All, | ||
| /// Show open pull requests | ||
| #[clap(visible_alias = "p")] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Pr, | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including comments like
# or hoc rinside the shell code blocks can make them less clean for copy-pasting. Consider documenting the aliases in a more structured way, such as separate lines or in the section headers.