Commander v0.9.0 Release Notes

Release Date: 2019-06-12 // over 3 years ago
  • ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘Œ Support for Swift < 4.2 has been removed.

    โœจ Enhancements

    • โž• Added syntax for using array as a type with Argument instead of using VariadicArgument:

      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 --help for group commands will now sort the commands in alphabetical order.
      Cameron Mc Gorian

    ๐Ÿ› Bug Fixes

    • 0๏ธโƒฃ Showing default values for custom ArgumentConvertible types are now supported in the --help output of commands.

    • ๐Ÿ–จ Only print errors in red if the output terminal supports ANSI colour codes. #58

    • ๐Ÿ“œ ArgumentParser.isEmpty will now return empty for empty arguments.