- Supporting using
=syntax with options and flags. For example--output=file.tar.gz/-o=file.tar.gz. This allows specifying negative, or empty values.
- Commander will now throw an error when a command which takes no arguments or
options is invoked with
--helpor unknown arguments.
- Usage/help output for commands which contain flags will now contain the short
flag, for example,
-v, --verbose. #71
- Fixed ordering of flags in the "Unknown Arguments" help output of a command.
Flags have previously been stored in an un orderered set and thus upon
printing them back out their order was not persisted and a flag part such as
-usercan be printed as-usre. #78
- Support for Swift < 4.2 has been removed.
-
Added syntax for using array as a type with
Argumentinstead of usingVariadicArgument:command(Argument<[String]>("names")) { names in }
-
Added support for optional arguments and options, for example:
command(Argument<String?>("name")) { name in } command(Option<String?>("name", default: nil)) { name in }
-
Added support for using
--to signal that subsequent values should be treated as arguments instead of options.
Tamas Lustyik -
Output of
--helpfor group commands will now sort the commands in alphabetical order.
Cameron Mc Gorian
-
Showing default values for custom
ArgumentConvertibletypes are now supported in the--helpoutput of commands. -
Only print errors in red if the output terminal supports ANSI colour codes. #58
-
ArgumentParser.isEmptywill now return empty for empty arguments.
- Consolidate the argument descriptors:
- All Option-related types now have a validator.
- All Option-related types now have a flag parameter.
- All constructors have the same constructor arguments order. #35
- Restores compatibility with Linux.
- The Swift Package now contains the Commander library product.
Switches to Swift 4.0.
- Better detection of ANSI support in output tty. #43
VariadicArgumentnow supports an optional validator.- Adds support for variadic options, allowing the user to repeat options to provide additional values. #37
- Argument descriptions are now printed in command help. #33
- Default option and flag default values will now be shown in help output. Only default option types of String and Int are currently supported in help output. #34
VaradicArgumenthas been renamed toVariadicArgument.
- Adds support for Swift 3.0
- Fix a potential crash when
UsageErroris thrown on Linux. --helpoutput now wraps arguments in diamonds<>.