-
Notifications
You must be signed in to change notification settings - Fork 10
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 for short options with numeric values, e.g, -p80 #60
Comments
With one dash or two? With one, I’d expect it’s short for |
what should the behavior with two dashes be |
A long option named “p80”, only. |
As per previous comment, I think |
As for the short option I do not think treating numbers as special for combining with short options is the correct high level approach. It is tempting and it is more familiar, but it is opinionated and breaks some other cases. In particular, digits are valid short flags. If One affordance that supporting (any) value directly following a short option allows is supplying negative numbers or other values starting with a dash. So if I would prefer to have no support for trailing values than treat numbers specially in this regard. Then we still have a simple self-consistent story. We support grouping short flags. We do/don't support trailing values. No special cases. |
I completely agree that if i do |
(Small nit, I disagree with |
What i mean is, with zero config, I’d expect them to all be considered as options, not values. |
Support for trailing values for short options has landed, so current behaviour is:
|
Seems like a reasonable feature to support which wouldn't step on other parsing goals.
Open question
What do you do with
--p80
?Refs: #59
The text was updated successfully, but these errors were encountered: