Repeated flags defined with FlagExclusivity.chooseFirst error instead of choosing first.
ArgumentParser version: master at 58660b0
Swift version: Apple Swift version 5.2 (swiftlang-1103.0.30 clang-1103.0.30)
Checklist
Steps to Reproduce
Use this simple program:
enum Enum: String, CaseIterable { case s, t, u }
struct Options: ParsableCommand {
@Flag(name: .short, exclusivity: .chooseFirst)
var flag1: Enum
}
let options = Options.parseOrExit()
print(options.flag1)
Expected behavior
It should print "s" by itself, on a line
Actual behavior
$ options -s -t
Error: Unknown option '-t'
Usage: options -s -t -u