-
Notifications
You must be signed in to change notification settings - Fork 428
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
Allow making inherited options hidden on subcommands #983
Labels
theme: usagehelp
An issue or change related to the usage help message
type: API 🔌
type: enhancement ✨
Milestone
Comments
remkop
added
the
theme: usagehelp
An issue or change related to the usage help message
label
Apr 14, 2020
Some work is in progress to address this: the tickets below make it easier to customize the option list in the usage help message. However, it is not yet possible to customize the synopsis...
|
remkop
added a commit
that referenced
this issue
Jun 3, 2020
remkop
added a commit
that referenced
this issue
Jun 6, 2020
This is now implemented in master. See these examples for how to accomplish this: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
theme: usagehelp
An issue or change related to the usage help message
type: API 🔌
type: enhancement ✨
This depends on #649.
Once inherited/global options are implemented, there will be cases where the top-level command defines many shared options, and each subcommands defines only the options applicable for that specific command. Applications may want to define some or all of the top-level options as "global" or "inherited" options, so they can be specified on the top-level command as well as on the subcommand.
However, they may not want the inherited options to clutter the usage help message of the subcommand, especially if there are many inherited options.
Ideas for Programmatic Solution
Provide API to allow subcommands to hide inherited options. For example:
Ideas for Declarative Solution
Add an enumeration value to hide inherited options. For example:
TBD should this apply to inherited positional parameters?
The text was updated successfully, but these errors were encountered: