github apple/swift-argument-parser 0.0.3
ArgumentParser 0.0.3

latest releases: 1.3.1, 1.3.0, 1.2.3...
4 years ago

Additions

  • You can specify the .unconditionalRemaining parsing strategy for arrays of
    positional arguments to accept dash-prefixed input, like
    example --one two -three.
  • You can now provide a default value for a positional argument.
  • You can now customize the display of default values in the extended help for
    an ExpressibleByArgument type.
  • You can call the static exitCode(for:) method on any command to retrieve the
    exit code for a given error.

Fixes

  • Supporting targets are now prefixed to prevent conflicts with other libraries.
  • The extension providing init?(argument:) to RawRepresentable types is now
    properly constrained.
  • The parser no longer treats passing the same exclusive flag more than once as
    an error.
  • ParsableArguments types that are declared as @OptionGroup() properties on
    commands can now also be declared on subcommands. Previosuly, the parent
    command's declaration would prevent subcommands from seeing the user-supplied
    arguments.
  • Default values are rendered correctly for properties with Optional types.
  • The output of help requests is now printed during the "exit" phase of execution,
    instead of during the "run" phase.
  • Usage strings now correctly show that optional positional arguments aren't
    required.
  • Extended help now omits extra line breaks when displaying arguments or commands
    with long names that don't provide help text.

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

NewReleases is sending notifications on new releases.