Skip to content

Exclusivity isn't adjustable for Boolean flags with flag inversion settings #60

@glessard

Description

@glessard
struct Options: ParsableCommand {
  @Flag(inversion: .prefixedNo)
  var x: Bool
}
options = Options.parseOrExit()
print(options.x)
$ options --x --no-x
false
$ options --no-x --x
true

Implicitly, they behave as if one had passed FlagExclusivity.chooseLast, but this is not adjustable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions