clikt / com.github.ajalt.clikt.parameters.arguments / Argument

Argument

interface Argument

A positional parameter to a command.

Arguments can take any number of values.

Properties

help

abstract val help: String

The description of this argument.

name

abstract val name: String

The metavar for this argument.

nvalues

abstract val nvalues: Int

The number of values that this argument takes.

parameterHelp

abstract val parameterHelp: Argument?

Information about this argument for the help output.

required

abstract val required: Boolean

If true, an error will be thrown if this argument is not given on the command line.

Functions

finalize

abstract fun finalize(context: Context, values: List<String>): Unit

Called after this command's argv is parsed to transform and store the argument's value.

Inheritors

ArgumentDelegate

interface ArgumentDelegate<out T> : Argument, ReadOnlyProperty<CliktCommand, T>

An argument that functions as a property delegate

ArgumentTransformContext

class ArgumentTransformContext : Argument

A receiver for argument transformers.