Static Propertyswift-argument-parser 1.6.1ArgumentParser
upToNextOption
Parse all values up to the next option.
static var upToNextOption: ArrayParsingStrategy { get }
For example, for a parsable type with a property defined as @Option(parsing: .upToNextOption) var files: [String]
, the input --files foo bar
would result in the array ["foo", "bar"]
.
Parsing stops as soon as there’s another option in the input such that --files foo bar --verbose
would also set files
to the array ["foo", "bar"]
.