mirror of
https://github.com/apple/swift-argument-parser.git
synced 2026-06-06 20:18:23 +00:00
This simplifies declaring alternate names by allowing just
a string representation of an option or flag name. The string
is parsed to split on spaces, and then validates that each
name has either a one or two dash prefix and is ASCII only.
Existing style:
@Flag(name: [.customLong("hex-output"), .customShort("x")])
var hexadecimalOutput = false
New style:
@Flag(name: "--hex-output -x")
var hexadecimalOutput = false