Add support for executable subcommands with help flags differing from those of the parent command#1957
Closed
aweebit wants to merge 6 commits intotj:developfrom
Closed
Conversation
Collaborator
|
I like the concept, but so low value and you have so many other PR that closing. May never come up in the real world! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: The change introduced here is of low importance.
This PR builds upon the already approved #1930.
Diff only for the change introduced by this PR:
aweebit/commander.js@feature/fixes...feature/help-command-executable-help-flags
Problem
Currently, help commands don't have support for executable subcommands whose help flags differ from those of the parent command.
Such support could be useful especially when third-party executables are used.
Solution
Get help flags to pass to an executable subcommand from the subcommand instance rather than the parent instance in
._dispatchHelpCommand().Make it possible to set custom flags for such a subcommand instance by including
helpFlagsin the options passed to.command().node program help executableChangeLog
Added
helpFlagsoption when calling.command())