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
Documentation -- alias of second option, confusing order #2625
Comments
@zerothi Your following assumption is correct.
The following @click.option('--shout/--no-shout', ' /-S', default=False) returns The following @click.option('--shout/--no-shout', '-S/ ', default=False) returns
This appears to be working correctly as documented. |
@j7an the problem is that the Options:
--shout / -S, --no-shout which makes me think that |
I have a feeling it will be ambiguous to someone regardless of what order or delimiters we use. I don't think we'll change it at this time. |
This is mainly a problem of the documentation:
See here: https://click.palletsprojects.com/en/8.1.x/options/#boolean-flags
I find this:
Perhaps it's getting late here, but.. I understand it like this:
--no-shout
.' /-S'
would mean that there is no short-hand for--shout
but-S
for--no-shout
(that may be weird, but that's how I read it...)--no-shout
, but not--shout
?I have tried:
Which is ok, but still a bit weird.
It seems it can only be used to select the order of the short-hand function for the documentation.
Perhaps this is intended, but I find the above quite confusing?
The text was updated successfully, but these errors were encountered: