-
-
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
Refactor help option and improve option parsing from parent when default command is invoked implicitly #1934
Commits on Aug 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1bb30d7 - Browse repository at this point
Copy the full SHA 1bb30d7View commit details
Commits on Aug 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e8bea4a - Browse repository at this point
Copy the full SHA e8bea4aView commit details -
Change initial variable values in test for better error messages
(cherry picked from commit 87db4ba)
Configuration menu - View commit details
-
Copy full SHA for e4d00db - Browse repository at this point
Copy the full SHA e4d00dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9857b1e - Browse repository at this point
Copy the full SHA 9857b1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for da1e153 - Browse repository at this point
Copy the full SHA da1e153View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35e9571 - Browse repository at this point
Copy the full SHA 35e9571View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5128d5f - Browse repository at this point
Copy the full SHA 5128d5fView commit details -
Eliminates outputHelpIfRequested() and incorporates help option parsing into .parseOptions() instead for consistency with other options. Additionally, improvements to the .parseOptions() code have been made, first and foremost to the comments.
Configuration menu - View commit details
-
Copy full SHA for 5b93a70 - Browse repository at this point
Copy the full SHA 5b93a70View commit details
Commits on Aug 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a12f5be - Browse repository at this point
Copy the full SHA a12f5beView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae0291b - Browse repository at this point
Copy the full SHA ae0291bView commit details -
Check for undefined in Option.is()
Eliminates the need for the check in other places. (cherry picked from commit a12f5be)
Configuration menu - View commit details
-
Copy full SHA for 97f3069 - Browse repository at this point
Copy the full SHA 97f3069View commit details -
Configuration menu - View commit details
-
Copy full SHA for 261a9d6 - Browse repository at this point
Copy the full SHA 261a9d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7335a9c - Browse repository at this point
Copy the full SHA 7335a9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74c1d4e - Browse repository at this point
Copy the full SHA 74c1d4eView commit details -
Handle obscured help flags and help for default command correctly
Achieved by giving up the earlier introduced 'option:' events for help and a better .parseOptions() design. The default command now concedes the help option to the parent in exactly the same cases in which all other options would be conceded.
Configuration menu - View commit details
-
Copy full SHA for f511028 - Browse repository at this point
Copy the full SHA f511028View commit details -
Refactor parseOptions() to a good library function
Add a displayHelp property to the returned object indicating whether a help flag had been found before encountering a subcommand, or before giving up option processing in favor of subcommands due to passThroughOptions being enabled. Before encountering a subcommand, the help option is now consumed in exactly the same cases any other option would be consumed.
Configuration menu - View commit details
-
Copy full SHA for 87ed7ea - Browse repository at this point
Copy the full SHA 87ed7eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 02fde0e - Browse repository at this point
Copy the full SHA 02fde0eView commit details -
Make passThroughOptions continue processing at unknown options
So that the help option is correctly consumed.
Configuration menu - View commit details
-
Copy full SHA for eae6c5f - Browse repository at this point
Copy the full SHA eae6c5fView commit details
Commits on Aug 5, 2023
-
Revert "Make passThroughOptions continue processing at unknown options"
This reverts commit eae6c5f.
Configuration menu - View commit details
-
Copy full SHA for de710a5 - Browse repository at this point
Copy the full SHA de710a5View commit details -
Handle help option specially in parseOptions()
Only the help flags are consumed after an unknown option is encountered and before a subcommand or a command-argument is encountered when using passThroughOptions. As a result, when a help flag is encountered in this stage of option processing, - the help is consumed by the parent command rather than by the subcommand if a subcommand is encountered later or a default command is provided; - the help is displayed instead of an unknown option error even when not using allowUnknownOption.
Configuration menu - View commit details
-
Copy full SHA for 31c03c7 - Browse repository at this point
Copy the full SHA 31c03c7View commit details -
Improve default command handling in parseOptions()
Only stop processing from parent when a sub-subcommand or a command-argument is encountered. Before that, known options found after an unknown one are consumed by the parent, including the help option.
Configuration menu - View commit details
-
Copy full SHA for aaf23bb - Browse repository at this point
Copy the full SHA aaf23bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d1fd350 - Browse repository at this point
Copy the full SHA d1fd350View commit details -
Improve comment on passThroughOptions
Includes a partial fix for tj#1936 (docs need an update, too)
Configuration menu - View commit details
-
Copy full SHA for b11e940 - Browse repository at this point
Copy the full SHA b11e940View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58b3003 - Browse repository at this point
Copy the full SHA 58b3003View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04be1b5 - Browse repository at this point
Copy the full SHA 04be1b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bab7e7 - Browse repository at this point
Copy the full SHA 0bab7e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd8ded5 - Browse repository at this point
Copy the full SHA cd8ded5View commit details -
Rework comment on passThroughOptions
(cherry picked from commit a8b656d)
Configuration menu - View commit details
-
Copy full SHA for cac1f8a - Browse repository at this point
Copy the full SHA cac1f8aView commit details
Commits on Aug 6, 2023
-
Fix implicit default command starting with unknown option
Reverts to original conditionals structure so that implicitly invoked default commands behave as if the command name came before the first arg that is not a known option, and not as if it came before the first arg that is not an option (known or unknown) like previously. Fixes pass through and handling of options after the unknown for implicitly invoked default commands.
Configuration menu - View commit details
-
Copy full SHA for e7c790a - Browse repository at this point
Copy the full SHA e7c790aView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd2c9c8 - Browse repository at this point
Copy the full SHA dd2c9c8View commit details
Commits on Aug 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f8e5faf - Browse repository at this point
Copy the full SHA f8e5fafView commit details
Commits on Aug 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a253ec6 - Browse repository at this point
Copy the full SHA a253ec6View commit details
Commits on Aug 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8dd417f - Browse repository at this point
Copy the full SHA 8dd417fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 513a4b5 - Browse repository at this point
Copy the full SHA 513a4b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e01bb9a - Browse repository at this point
Copy the full SHA e01bb9aView commit details