Skip to content

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#1060
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

@FrankRay78

Copy link
Copy Markdown
Contributor

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 ConvertFlagsToRemainingArgumentsIfCannotBeAssigned has 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 the Flags 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

@FrankRay78 FrankRay78 changed the title 1059 ability to add command line values to remaining arguments if they cannot be set on the settings class2 1059 Ability to add command line values to remaining arguments if they cannot be set on the settings class Nov 11, 2022
@FrankRay78

Copy link
Copy Markdown
Contributor Author

Closing as I have replaced this PR with #1102

@FrankRay78 FrankRay78 closed this Dec 8, 2022
@FrankRay78 FrankRay78 deleted the 1059-Ability-to-add-command-line-values-to-remaining-arguments-if-they-cannot-be-set-on-the-settings-class2 branch December 8, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant