Swift Argument Parser v0.5.0 Release Notes
Release Date: 2021-09-02 // over 2 years ago-
➕ Additions
- When a user doesn't provide a required argument, the error message now includes that argument's help text. ([#324])
- 📜 Command-line tools built with
ArgumentParser
now include an experimental flag to dump command/argument/help information as JSON:--experimental-dump-help
. ([#310])
🔄 Changes
- All public enumerations are now structs with static properties, to make compatibility with future additions simpler.
🛠 Fixes
📜 Array properties defined as
@Option
with the.upToNextOption
parsing strategy now include all provided values. ([#304]) In the example below, all four values are now included in the resulting array, where only the last two were included in previous releases:struct Example: ParsableCommand { @Option(parsing: .upToNextOption) var option: [String] }
$ example --option one two --option three four
When a command defines an array property as an
@Argument
with the.unconditionalRemaining
parsing strategy, option and flag parsing now stops at the first positional argument or unrecognized flag. ([#333])Completion scripts correctly use customized help flags. ([#308])
🛠 Fixes errors with bash custom completion arguments and the executable path. ([#320], [#323])
🛠 Fixes the behavior when a user specifies both the
help
subcommand and a help flag. ([#309])A variety of internal improvements. ([#315], [#316], [#321], [#341])
🚀 The 0.5.0 release includes contributions from [atierian], [compnerd], [dirtyhabits97], [Frizlab], [KS1019], [natecook1000], and [rauhul]. Thank you!