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

For subcommand names, replace underscores by dashes #44

Closed
anntzer opened this issue Jul 29, 2017 · 2 comments
Closed

For subcommand names, replace underscores by dashes #44

anntzer opened this issue Jul 29, 2017 · 2 comments

Comments

@anntzer
Copy link
Owner

anntzer commented Jul 29, 2017

Options already implicitly replace underscores in their names by dashes in the CLI. For consistency, it would be appreciated if subcommands did the same. The options I see are

  • break backcompatibilty and make this nonconfigurable.
  • make this configurable (seems a bit overkill and inconsistent with the behavior for flags)
  • hack into add_subparsers to map both ./foo.py bar_baz and ./foo.py bar-baz to the same function, preferably while displaying only one of them in the help string.
@evanunderscore
Copy link
Collaborator

For simplicity I'm fine with breaking backwards compatibility and bumping the major version.

@anntzer
Copy link
Owner Author

anntzer commented Aug 3, 2017

We may need to be careful with subcommand names that currently start with an underscore, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants