-
Notifications
You must be signed in to change notification settings - Fork 116
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
Showing global options in command parsers #138
Comments
+1 :) |
Unfortunately this help does not show global options; see pcapriotti/optparse-applicative#138 .
+1 |
I've made some changes to how contexts are carried through, so this should be easier now. |
+1 |
I am very interested in having a fix for this. Does anyone maybe have a somewhat doable workaround for this? |
There is a workaround, although it's a bit of work. Basically you have to add the global options parser both in the outer parser and to every subcommand parser, and then you combine the "outer" global options with the "inner" global options (having the inner options take precedence). You also have to make sure you set |
Hmm. Sounds as if its almost easier to only have local options then. |
Why was this issue closed? There still doesn't seem to be a way to do this (apart from the complicated workaround of @borsboom) |
Is it possible to have e.g.
foo --help
produceand then
foo dothing --help
producelike that? So that
--verbose
is still listed because it's a global option but applies todothing
too?The text was updated successfully, but these errors were encountered: