Not sure if this is possible or not, but it would be super convenient if one could use Option Groups as Global Options.
I'm creating a tool where all commands require the same mutually exclusive Key items to define the input source (different possible variations of sources, but there must be one and only one).
What I am doing now is for each command, I'm doing this:
@Key("-p", "--project")
var project: String?
@Key("-w", "--workspace")
var workspace: String?
@Key("-f", "--file")
var file: String?
var optionGroups: [OptionGroup] {
return [.exactlyOne($project, $workspace, $file)]
}
Not sure if this is possible or not, but it would be super convenient if one could use Option Groups as Global Options.
I'm creating a tool where all commands require the same mutually exclusive
Key
items to define the input source (different possible variations of sources, but there must be one and only one).What I am doing now is for each command, I'm doing this:
I'd ideally like to make that global.