github apple/swift-argument-parser 1.4.0
ArgumentParser 1.4.0

one month ago

Additions

  • Adds support for subcommand aliases via a new CommandConfiguration.aliases parameter. Aliases are shown in help text and used during command parsing. For example, a subcommand like "average" from the example "math" tool can be defined with the aliases ["avg"]. The resulting subcommand can now be invoked with either of math stats average and ``math stats avg`. See the updated documentation and example for additional details. (#627)
  • Adds a new API usageString to ParsableArguments and ParsableCommand for retrieving their usage text, allowing for more flexible construction of error screens. (#634)
  • Adds support for passing custom arguments to AsyncParsableCommand.main() with a new static func main(_ arguments: [String]?) async method. (#568)

Fixes

  • Removes default parameter values from deprecated CommandConfiguration initializers to prevent them from being selected as overloads. Some niche invalid deprecation warnings should no longer occur. (#636)

The 1.4.0 release includes contributions from @Austinpayne, @dcantah, @KS1019, @natecook1000, @rauhul, and @revolter. Thank you!

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

NewReleases is sending notifications on new releases.