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
Misleading error reports for two sub-parsers #92
Labels
Comments
|
#162 |
Merged, please reopen if there's any issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a tool that runs in two phases, both phases share some options and have additional custom options. I want to run
Here
max-num=4
andverbose
belong to phase 1 andmax-num=3
andspecial
belong to phase 2. The order of options within a phase, likemax-num=4
andverbose
, is irrelevant.Mr. Capriotti suggested to define two subparsers each with a command. This is what I did. It means that
phase1
andphase2
don't start with dashes and that they can appear in any order.See the attached module which is an extension of the example from the Hackage front page of
optparse-applicative
. There the sub-commands are calledadd
andcommit
. I hope it is not too confusing.Now the following problem arises:
That is, the
add
command is completely specified and thecommit
command is missing. However the parser suggests that there is something wrong with theadd
command.The text was updated successfully, but these errors were encountered: