All Versions
28
Latest Version
Avg Release Cycle
46 days
Latest Release
-
Changelog History
Page 2
Changelog History
Page 2
-
v2.8.0 Changes
June 19, 20202020-06-19
โ Added
- โ Added
error
parameter toPrintMessage
andPrintHelpMessage
. Whentrue
,CliktCommand.main
will exit with status code 1. (#187)
๐ Changed
- ๐จ When
printHelpOnEmptyArgs
istrue
and no arguments are present, or wheninvokeWithoutSubcommand
isfalse
and no subcommand is present,CliktCommand.main
will now exit with status code 1 rather than 0. restrictTo
now works with anyComparable
value, not justNumber
.CliktCommand.main
now acceptsArray<out String>
, not justArray<String>
. (#196)
๐ Fixed
- ๐ Fixed option values being reset when calling multiple subcommands with
allowMultipleSubcommands=true
(#190)
- โ Added
-
v2.7.1 Changes
May 19, 2020 -
v2.7.0 Changes
May 13, 2020โ Added
- Ability to use custom program exit status codes via
ProgramResult
. inputStream
andoutputStream
conversions for options and arguments. (#157 and #159)splitPair
,toMap
, andassociate
extensions onoption
. (#166)treatUnknownOptionsAsArgs
parameter toCliktCommand
. (#152)- 0๏ธโฃ
defaultByName
function forgroupChoice
andgroupSwitch
options. (#171)
๐ Changed
- โก๏ธ Update Kotlin to 1.3.71
- ๐ Improved command name inference. Now, a class like
MyAppCommand
will infer itscommandName
asmy-app
rather thanmyappcommand
. You can still specify the name manually as before. (#168)
๐ Fixed
- ๐ Correctly parse short options with attached values that contain
=
๐ Thanks to @sschuberth for his contributions to this release!
- Ability to use custom program exit status codes via
-
v2.6.0 Changes
March 15, 20202020-03-15
โ Added
registeredSubcommands
,registeredOptions
,registeredArguments
, andregisteredParameterGroups
methods onCliktCommand
.- ๐ 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 toCliktCommand
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 likeint
andfile
.CliktCommand.toString
now includes the class name- Reverted automatic
~
expansion infile()
andpath()
introduced in 2.5.0. If you need this behavior, you can implement it with code likeconvert { /* expand tidle */ }.file()
๐ Deprecated
- ๐
wrapValue
is now deprecated, sinceconvert
can be used in its place instead.
-
v2.5.0 Changes
February 22, 20202020-02-22
โ Added
- ๐ Clikt is now available as a Kotlin Multiplatform Project, supporting JVM, NodeJS, and native Windows, Linux, and macOS.
eagerOption {}
function to more easily register eager options.- Eager options can now be added to option groups in help out by passing a value for
groupName
when creating them. canBeSymlink
parameter tofile()
andpath()
conversions that can be used to disallow symlinksCliktCommand.eagerOption
to simplify creating custom eager options
๐ Changed
- ๐ The parameter names of
file()
andpath()
conversions have changed. The existing names are deprecated, and can be converted to the new usages with an IntelliJ inspection. Note that if you are calling these functions with unnamed arguments (e.g.file(true, false)
), you'll need to add argument names in order to remove the deprecation warning.
๐ Deprecated
- ๐ The
CliktCommand.context
property has been deprecated in favor of the new name,currentContext
, to avoid confusion with theCliktCommand.context{}
method. - ๐
NoRunCliktCommand
was renamed toNoOpCliktCommand
. The existing class is deprecated. (#130)
๐ Fixed
file()
andpath()
conversions will now properly expand leading~
in paths to the home directory formustExist
,canBeFile
, andcanBeDir
checks. The property value is unchanged, and can still begin with a~
. (#131)
-
v2.5.0-beta1
February 13, 2020 -
v2.4.0 Changes
January 25, 2020โ Added
- ๐
CompletionCandidates.Fixed
now has a secondary convenience constructor that take avararg
ofString
s CompletionCadidates.Custom
, which allows you to call other binaries or write a script to generate completions. This class is currently experimental. (#79)Option.wrapValue
andArgument.wrapValue
to make it easier to reuse existing conversion functions.ignoreCase
parameter tochoice()
andenum()
conversion functions.
๐ Changed
- 0๏ธโฃ
option()
andargument()
now take optionalcompletionCandidates
parameters to override how completion is generated. The constructor andcopy
functions ofOptionsWithValues
andProcessedArgument
have changed to support default values. - ๐ The overloads of
findObject
(1 2) that take a default value have been renamedfindOrSetObject
. The existing names are marked with@Deprecated
, and IntelliJ can convert your callsites automatically. (#110) - 0๏ธโฃ
enum()
parameters now accept case-insensitive values by default. You change this behavior by passingignoreCase = false
toenum()
(#115)
๐ Fixed
groupChoice
help output now includes the choices in the help output metavarTermUi.edit*
functions could freeze on certain editors (#99, thanks @iampravikant and @sebokopter)- Shell completion can now handle command names with dashes. (#104)
- Arguments with
=
in them could be incorrectly interpreted as options (#106)
- ๐
-
v2.3.0 Changes
November 07, 20192019-11-07
โ Added
option().groupSwitch()
, which works likegroupChoice()
, but uses aswitch()
option rather than achoice()
option.- 0๏ธโฃ
UsageError
now has astatusCode
parameter (which defaults to 1). If you're usingClicktCommand.main
, the value ofstatusCode
will be passed toexitProcess
.
๐ Changed
- ๐จ Shell completion code is now printed by throwing a
PrintCompletionMessage
(a subclass ofPrintMessage
) rather than callingecho
directly.
-
v2.2.0 Changes
September 25, 20192019-09-25
โ Added
- โ Added
enum()
conversion for options and arguments. (#84)
๐ Changed
- There are now several ways of preventing @-file expansion
๐ Fixed
- โ Added
-
v2.1.0 Changes
May 23, 20192019-05-23
โ Added
- Ability to prevent rewrapping individual paragraphs in help output.
- โ Added parameter
required
toOption.multiple()
to require at least one instance of the option on the command line.
๐ Changed
CliktCommand.toString()
now includes the names and values of all parameters and subcommands.
๐ Fixed
- Create subcommand context when
helpOptionNames
is empty. (#64)