clikt / com.github.ajalt.clikt.parameters.options / multiple


fun Any, ValueT> NullableOption.multiple(default: List = emptyList(), required: Boolean = false): OptionWithValues<List, EachT, ValueT>

Make the option return a list of calls; each item in the list is the value of one call.

If the option is never called, the list will be empty. This must be applied after all other transforms.


``` kotlin val opt: List> by option().int().pair().multiple()


default - The value to use if the option is not supplied. Defaults to an empty list.

required - If true, default is ignored and MissingParameter will be thrown if no instances of the option are present on the command line.