github apple/swift-argument-parser 1.8.0
ArgumentParser 1.8.0

3 hours ago

Additions

  • NameSpecification and its elements now conform to ExpressibleByStringLiteral, allowing simplified option and flag name declarations. For example, @.customLong("hex-output"), .customShort("x") can now be written as "--hex-output -x". (#745)
  • New @Option initializers accept a defaultAsFlag: 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 AsyncParsableCommand types now support async/await. (#855)

Changes

  • The minimum Swift version for swift-argument-parser has 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 an inversion: parameter now produces a useful diagnostic message. (#892)

The 1.8.0 release includes contributions from @bkhouri, @natecook1000, @qflen, @rauhul, and @rgoldberg. Thank you!

Don't miss a new swift-argument-parser release

NewReleases is sending notifications on new releases.