-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Poll: Enhancements to global options #1551
Comments
This could be a parameter to console.log('combined options: %o', sub.opts({ includeGlobals: true })); Add 👍 reaction if you would like something like this. |
program.includeGlobalsInOptions(); Add 👍 reaction if you would like something like this. |
program.includeGlobalOptionsInHelp(); $ node example.js help sub
Usage: example sub [options]
Options:
-l, --local
-h, --help display help for command
Global Options:
-g, --global Add 👍 reaction if you would like something like this. |
program.commonOption('-l, --local'); Add 👍 reaction if you would like something like this. |
It's a mandatory feature and should be implemented soon :). |
@shadowspawn what is the time span for this poll? |
Counts at 2021-12-21.
Thanks for the feedback. |
I wasn't working on global options, and two of the options have been tracking with similar numbers of votes, so I had just left the poll open! |
Opened a draft PR for FYI: @rhyslbw @GerkinDev @WinterWolf98 @phi0411141 @kasperisager @zecka @mikemilano @aprat84 @ramoncarreras @DavidDudson |
Opened a draft PR for FYI: @shivanshs9 @GerkinDev @gralka @kuncevic @guillaumeLamanda @mikemilano @sureshkmit @binyamin |
Opened a PR to optionally show global options in the help: #1828 |
Commander supports global options by declaring them on the program. This is flexible, but Commander does not offer any additional support to make them easier to use as a programmer or find them as a user. Example program with current behaviour:
Related: #243 #476 #905 #1024 (comment) #1078 #1426 #1631
What additional support would you like? (I am wondering what is most popular and useful, not planning to add everything!)
The text was updated successfully, but these errors were encountered: