1059 Ability to add command line values to remaining arguments if they cannot be set on the settings class#1060
Closed
FrankRay78 wants to merge 5 commits into
spectreconsole:mainfrom
FrankRay78:1059-Ability-to-add-command-line-values-to-remaining-arguments-if-they-cannot-be-set-on-the-settings-class2
Closed
1059 Ability to add command line values to remaining arguments if they cannot be set on the settings class#1060FrankRay78 wants to merge 5 commits intospectreconsole:mainfrom FrankRay78:1059-Ability-to-add-command-line-values-to-remaining-arguments-if-they-cannot-be-set-on-the-settings-class2
FrankRay78 wants to merge 5 commits into
spectreconsole:mainfrom
FrankRay78:1059-Ability-to-add-command-line-values-to-remaining-arguments-if-they-cannot-be-set-on-the-settings-class2
Conversation
… unterminated), whitespace, hyphens and special characters (eg. emojis)
…d-line-argument-parsing
Contributor
Author
|
Closing as I have replaced this PR with #1102 |
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.
This PR implements #1059, 'Ability to add command line flags and their values to remaining arguments if they cannot be set on the settings class'
A configuration setting called
ConvertFlagsToRemainingArgumentsIfCannotBeAssignedhas been added to the CommandAppSettings interface/class, which determines whether this behaviour has been turned on (defaults to off to ensure backward compatibility). CommandTreeParser checks this setting prior to deciding whether to throw theFlags cannot be set.exception, or alternatively, to add the flag and its value to the remaining arguments collection.Whilst this PR consists of 5 commits, it's the last commit titled
Allow flags to be converted to remaining arguments if they cannot be assigned(11 Nov 2022) that contains the changes for this PR - the previous commits are because I branched from #1048, which is a dependency because command options (and their values) should work nicely ahead of any arguments.Important: #1048 should be merged ahead of this PR