Additions
NameSpecificationand its elements now conform toExpressibleByStringLiteral, allowing simplified option and flag name declarations. For example,@.customLong("hex-output"), .customShort("x")can now be written as"--hex-output -x". (#745)- New
@Optioninitializers accept adefaultAsFlag:parameter, creating options that work both as a bare flag (--format) and as an option with a value (--format json). (#830) - Custom completion closures for
AsyncParsableCommandtypes now supportasync/await. (#855)
Changes
- The minimum Swift version for
swift-argument-parserhas been updated to Swift 6. Users of older Swift versions can continue using version 1.7.1 of the library. (#882)
Fixes
- Command aliases now appear in generated man-pages for both single-page and multi-page output. (#891)
- Declaring
@Flag var x: Bool?without aninversion:parameter now produces a useful diagnostic message. (#892)
The 1.8.0 release includes contributions from @bkhouri, @natecook1000, @qflen, @rauhul, and @rgoldberg. Thank you!