clikt v2.6.0 Release Notes

Release Date: 2020-03-15 // 5 months ago
  • 2020-03-15

    ➕ Added

    • registeredSubcommands, registeredOptions, registeredArguments, and registeredParameterGroups methods on CliktCommand.
    • 👀 Ability to read default option values from configuration files and other sources. Support for Java property files is built in on JVM, see the json sample for an example of reading from other formats.
    • 📄 allowMultipleSubcommands parameter to CliktCommand that allows you to pass multiple subcommands in the same call. (docs)
    • ✏️ Errors from typos in subcommand names will now include suggested corrections. Corrections for options and subcommands are now based on a Jaro-Winkler similarity metric, and can be customized with Context.correctionSuggestor

    🔄 Changed

    • ⚡️ Update Kotlin to 1.3.70
    • convert can be called more than once on the same option or argument, including after calls to conversion functions like int and file.
    • CliktCommand.toString now includes the class name
    • Reverted automatic ~ expansion in file() and path() introduced in 2.5.0. If you need this behavior, you can implement it with code like convert { /* expand tidle */ }.file()

    🗄 Deprecated

    • 🗄 wrapValue is now deprecated, since convert can be used in its place instead.