Skip to content

Short option which allows zero arguments followed by another short option without dash #772

Answered by phlptp
RL-S asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at this a little closer, there is probably an inconsistency here in the way multiple single arguments are treated with a single -.
As you have it -of has to treat it as -o=f if it didn't it would open up all sorts of issues.

However, there is a modifier validate_optional_arguments() to the option which would allow a validation step to discriminate optional arguments from others. Which looking at the code is not consistently applied in the case of chaining single character options.

So the documentation states that a non flag option must come last in the chain, however, this case is a bit of a gray area and an argument could be made that if combined with validate_optional_arguments()

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@RL-S
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by RL-S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants