Argument

interface Argument

A positional parameter to a command.

Arguments can take any number of values.

Functions

finalize
Link copied to clipboard
common
abstract fun finalize(context: Context, values: List<String>)
Called after this command's argv is parsed to transform and store the argument's value.
parameterHelp
Link copied to clipboard
common
abstract fun parameterHelp(context: Context): HelpFormatter.ParameterHelp.Argument?
Information about this argument for the help output.
postValidate
Link copied to clipboard
common
abstract fun postValidate(context: Context)
Called after all of a command's parameters have been finalized to perform validation of the final value.

Properties

argumentHelp
Link copied to clipboard
common
abstract val argumentHelp: String
The description of this argument.
completionCandidates
Link copied to clipboard
common
open val completionCandidates: CompletionCandidates
Optional set of strings to use when the user invokes shell autocomplete on a value for this argument.
helpTags
Link copied to clipboard
common
abstract val helpTags: Map<String, String>
Extra information about this argument to pass to the help formatter.
name
Link copied to clipboard
common
abstract val name: String
The metavar for this argument.
nvalues
Link copied to clipboard
common
abstract val nvalues: Int
The number of values that this argument takes.
required
Link copied to clipboard
common
abstract val required: Boolean
If true, an error will be thrown if this argument is not given on the command line.

Inheritors

ArgumentDelegate
Link copied to clipboard
ArgumentTransformContext
Link copied to clipboard