github apple/swift-argument-parser 0.5.0
ArgumentParser 0.5.0

latest releases: 1.3.1, 1.3.0, 1.2.3...
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)

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

NewReleases is sending notifications on new releases.