Replies: 3 comments 2 replies
-
This is related to #24 |
Beta Was this translation helpful? Give feedback.
-
GNU tools and many others use the |
Beta Was this translation helpful? Give feedback.
-
Right. There are two choices.. You do not treat "--xxx" as a special prefix that only means an option. Which is what Lyra does currently. Or you do make "--xxx" special and then need the special token, i.e. "--"by itself, to turn off the restriction. The only way for a CLI to support that would be have two different, mutually exclusive, parsing modes. |
Beta Was this translation helpful? Give feedback.
-
When there are options as well as positional arguments, some of which may be optional, there is a problem with unknown options. Consider this repro case:
which leads to this output:
This is a problem, because
--bar
as is not reported as unknown/invalid option, but passed to the next positional argument. It is pretty unlikely that the user intended to use--bar
as a positional argument -- most likely they made a typo or another mistake and need to read the help page.Beta Was this translation helpful? Give feedback.
All reactions