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

multiple

fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.multiple(): OptionWithValues<List<EachT>, 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.

Example:

val opt: List<Pair<Int, Int>> by option().int().pair().multiple()