github apple/swift-argument-parser 0.0.2
ArgumentParser 0.0.2

latest releases: 1.5.0, 1.4.0, 1.3.1...
4 years ago

Additions

  • The EX_USAGE exit code is now used for validation errors.
  • The parser provides near-miss suggestions when a user provides an unknown option.
  • ArgumentParser now builds on Windows.
  • You can throw an ExitCode error to exit without printing any output.
  • You can now create optional Boolean flags with inversions that default to nil:
    @Flag(inversion: .prefixedNo) var takeMyShot: Bool?
  • You can now specify exclusivity for case-iterable flags and for Boolean flags with inversions.

Fixes

  • Cleaned up a wide variety of documentation typos and shortcomings.
  • Improved different kinds of error messages:
    • Duplicate exclusive flags now show the duplicated arguments.
    • Subcommand validation errors print the correct usage string.
  • In the help screen:
    • Removed the extra space before the default value for arguments without descriptions.
    • Removed the default value note when the default value is an empty string.
    • Default values are now shown for Boolean options.
    • Case-iterable flags are now grouped correctly.
    • Case-iterable flags with default values now show the default value.
    • Arguments from parent commands that are included via @OptionGroup in subcommands are no longer duplicated.
  • Case-iterable flags created with the .chooseFirst exclusivity parameter now correctly ignore additional flags.

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

NewReleases is sending notifications on new releases.