ArgumentSpec

class ArgumentSpec(val name: String, val converter: Converter<*>, val help: String = "", val required: Boolean = true, val multiple: Boolean = false) : ParamSpec

A positional parameter, consumed left to right from the non-option arguments.

Parameters

name

the parameter name, shown in help and used as the lookup key in ParsedValues.

converter

converts each raw value to the typed result.

help

help text for --help.

required

whether at least one value must be supplied.

multiple

when true, captures all remaining positionals. At most one parameter per command may set this, and it must be declared last.

Constructors

Link copied to clipboard
constructor(name: String, converter: Converter<*>, help: String = "", required: Boolean = true, multiple: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
open override val help: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard