Changelog History
Page 2
-
v0.4.4 Changes
July 30, 2021๐ Fixes
- โช Includes a workaround for a runtime crash with certain
OptionGroup
configurations when a command is compiled in release mode.
- โช Includes a workaround for a runtime crash with certain
-
v0.4.3 Changes
April 28, 2021โ Additions
- Experimental API for hiding
@OptionGroup
-declared properties from the help screen.
๐ The 0.4.3 release includes a contribution from [miggs597]. Thank you!
- Experimental API for hiding
-
v0.4.2 Changes
April 21, 2021๐ Fixes
- Both parts of a flag with an inversion are now hidden when specified.
- ๐ Better support for building on OpenBSD.
- ๐ Optional unparsed values are now always properly decoded. ([#290])
- Help information from super-commands is no longer unnecessarily injected into subcommand help screens.
๐ The 0.4.2 release includes contributions from [3405691582], [kylemacomber], [miggs597], [natecook1000], and [werm098]. Thank you!
-
v0.4.1 Changes
March 08, 2021โ Additions
- When a user provides an invalid value as an argument or option, the error message now includes the help text for that argument.
๐ Fixes
- Zsh completion scripts for commands that include a hyphen no longer cause errors.
- ๐ Optional unparsed values are now decoded correctly in
ParsableArguments
types.
๐ The 0.4.1 release includes contributions from [adellibovi] and [natecook1000]. Thank you!
-
v0.4.0 Changes
March 04, 2021โ Additions
- ๐ Short options can now support "joined option" syntax, which lets users specify
a value appended immediately after the option's short name. For example, in
addition to calling this
example
command with-D debug
and-D=debug
, users can now write-Ddebug
for the same parsed value. ([#240])
@main struct Example: ParsableCommand { @Option(name: .customShort("D", allowingJoined: true)) var debugValue: String func run() { print(debugValue) } }
๐ Changes
- The
CommandConfiguration.helpNames
property is now optional, to allow the overridden help flags of parent commands to flow down to their children. Most existing code should not be affected, but if you've customized a command's help flags you may see different behavior. ([#251]) - The
errorCode
property is no longer used as a command's exit code whenCustomNSError
types are thrown. ([#276])
Migration: Instead of throwing a
CustomNSError
type, print your error manually and throw anExitCode
error to customize your command's exit code.Removals
- ๐ Old, deprecated property wrapper initializers have been removed.
๐ Fixes
- Validation errors now show the correct help flags when help flags have been customized.
- Options, flags, and arguments that are marked as hidden from the help screen are also suppressed from completion scripts.
- ๐ Non-parsed variable properties are now allowed in parsable types.
- Error messages produced when
NSError
types are thrown have been improved. - The usage line for commands with a large number of options includes more detail about required flags and positional arguments.
- ๐ Support for CMake builds on Apple Silicon is improved.
๐ The 0.4.0 release includes contributions from [CodaFi], [lorentey], [natecook1000], [schlagelk], and [Zoha131]. Thank you!
- ๐ Short options can now support "joined option" syntax, which lets users specify
a value appended immediately after the option's short name. For example, in
addition to calling this
-
v0.3.2 Changes
January 15, 2021๐ Fixes
- ๐ Changes made to a command's properties in its
validate
method are now persisted. - The exit code defined by error types that conform to
CustomNSError
are now honored. - ๐ Improved error message when declaring a command type with an unadorned mutable property. (See [#256] for more.)
- ๐ Migrated from
CRT
toMSVCRT
for Windows platforms. - ๐ Fixes and improvements for building with CMake for Windows and Apple Silicon.
- ๐ Documentation improvements.
๐ The 0.3.2 release includes contributions from [compnerd], [CypherPoet], [damuellen], [drewmccormack], [elliottwilliams], [gmittert], [MaxDesiatov], [natecook1000], [pegasuze], and [SergeyPetrachkov]. Thank you!
- ๐ Changes made to a command's properties in its
-
v0.3.1 Changes
September 02, 2020๐ Fixes
- An option or flag can now declare a name with both single- and double-
dash prefixes, such as
-my-flag
and--my-flag
. Specify both names in thename
parameter when declaring your property:
@Flag(name: [.long, .customLong("my-flag", withSingleDash: true)]) var myFlag = false
- ๐ Parsing performance improvements.
- An option or flag can now declare a name with both single- and double-
dash prefixes, such as
-
v0.3.0 Changes
August 15, 2020โ Additions
- Shell completions scripts are now available for Fish.
๐ Changes
- 0๏ธโฃ Array properties without a default value are now treated as required for the user of a command-line tool. In previous versions of the library, these properties defaulted to an empty array; a deprecation was introduced for this behavior in version 0.2.0.
Migration: Specify an empty array as the default value for properties that should not require user input:
// old @Option var names: [String] // new @Option var names: [String] = []
๐ The 0.3.0 release includes contributions from [dduan], [MPLew-is], [natecook1000], and [thomasvl]. Thank you!
-
v0.2.2 Changes
August 05, 2020๐ Fixes
- ๐ Zsh completion scripts have improved documentation and better support multi-word completion strings, escaped characters, non-standard executable locations, and empty help strings.
๐ The 0.2.2 release includes contributions from [interstateone], [miguelangel-dev], [natecook1000], [stuartcarnie], and [Wevah]. Thank you!
-
v0.2.1 Changes
July 30, 2020โ Additions
- You can now generate Bash and Zsh shell completion scripts for commands,
either by using the
--generate-completion-script
flag when running a command, or by calling the staticcompletionScript(for:)
method on a rootParsableCommand
type. See the [guide to completion scripts][comp-guide] for information on customizing and installing the completion script for your command.
๐ Fixes
- Property wrappers without parameters can now be written without parentheses
โ e.g.
@Flag var verbose = false
. - 0๏ธโฃ When displaying default values for array properties, the help screen now
correctly uses the element type's
ExpressibleByArgument
conformance to generate the description. - โ Running a project that defines a command as its own subcommand now fails with a useful error message.
๐ The 0.2.1 release includes contributions from [natecook1000], [NicFontana], [schlagelk], [sharplet], and [Wevah]. Thank you!
๐ [comp-guide]: https://github.com/apple/swift-argument-parser/blob/main/Documentation/07%20Completion%20Scripts.md
- You can now generate Bash and Zsh shell completion scripts for commands,
either by using the