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

Support dash-separated names #29

Open
jaraco opened this issue Dec 4, 2023 · 1 comment
Open

Support dash-separated names #29

jaraco opened this issue Dec 4, 2023 · 1 comment

Comments

@jaraco
Copy link
Contributor

jaraco commented Dec 4, 2023

I recently tried:

@autocommand
def main(dry_run=False):
  ...

And it created an option --dry_run, which was a surprised because other parts of autocommand seem to use - as the separator (e.g. --no- for negation).

It would be nice if there were an option to substitute the underscore for a dash, e.g.

@autocommand(preferred_separator='-')
def main(dry_run=False):
  ...

Would then expect --dry-run and --no-dry-run as the options.

@Lucretiel
Copy link
Owner

This has been on my list for a while! When I first designed it, I actually deliberately wanted the no- vs _ behavior, because it mean there wasn't any possibility of a name collision. I've since come to the pretty obvious conclusion that that's not worth worrying about. Thanks for the ticket.

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