Skip to content
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

Feature: subcommand aliases #75

Merged
merged 3 commits into from
Jul 13, 2021
Merged

Feature: subcommand aliases #75

merged 3 commits into from
Jul 13, 2021

Conversation

janluke
Copy link
Owner

@janluke janluke commented Jul 13, 2021

Changes:

  • Closes Command aliases #64.
  • Add an aliases attribute to Cloup commands and decorators.
  • Decorators add aliases to non-Cloup commands by monkey-patching (if provided).
  • Cloup commands always show aliases in their own help, below Usage.
  • Add a show_subcommand_aliases setting to cloup.Group and Context. This option is for showing aliases of subcommand in the Group help output and defaults to False.
  • To support the show_subcommand_aliases context setting, added ctx argument to make_commands_help_section and format_subcommand_name.

See the docs for more.

janluke added 2 commits July 13, 2021 16:01
…at_subcommand_name

This is needed to support the future show_subcommand_aliases setting.

BREAKING CHANGE
@janluke janluke added the enhancement New feature or request label Jul 13, 2021
@janluke janluke merged commit b771c4a into master Jul 13, 2021
@janluke janluke deleted the feat/aliases branch July 13, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command aliases
1 participant