multiple
fun <T : Any> ProcessedArgument<T, T>.multiple(required: Boolean = false, default: List<T> = emptyList()): ProcessedArgument<List<T>, T>
Accept any number of values to this argument.
Only one argument in a command may use this function, and the command may not have subcommands. This must be called after all other transforms.
Example:
val arg: List<Int> by argument().int().multiple()
Content copied to clipboard
Parameters
required
If true, default is ignored and MissingArgument will be thrown if no instances of the argument are present on the command line.
default
The value to use if the argument is not supplied. Defaults to an empty list.