Option

interface Option

An optional command line parameter that takes a fixed number of values.

Options can take any fixed number of values, including 0.

Functions

finalize
Link copied to clipboard
common
abstract fun finalize(context: Context, invocations: List<OptionParser.Invocation>)
Called after this command's argv is parsed to transform and store the option's value.
metavar
Link copied to clipboard
common
abstract fun metavar(context: Context): String?
A name representing the values for this option that can be displayed to the user.
parameterHelp
Link copied to clipboard
common
open fun parameterHelp(context: Context): HelpFormatter.ParameterHelp.Option?
Information about this option 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

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 option.
helpTags
Link copied to clipboard
common
abstract val helpTags: Map<String, String>
Extra information about this option to pass to the help formatter.
hidden
Link copied to clipboard
common
abstract val hidden: Boolean
If true, this option should not appear in help output.
names
Link copied to clipboard
common
abstract val names: Set<String>
The names that can be used to invoke this option.
nvalues
Link copied to clipboard
common
abstract val nvalues: Int
The number of values that must be given to this option.
optionHelp
Link copied to clipboard
common
abstract val optionHelp: String
The description of this option, usually a single line.
parser
Link copied to clipboard
common
abstract val parser: OptionParser
The parser for this option's values.
secondaryNames
Link copied to clipboard
common
abstract val secondaryNames: Set<String>
Names that can be used for a secondary purpose, like disabling flag options.
valueSourceKey
Link copied to clipboard
common
abstract val valueSourceKey: String?
Optional explicit key to use when looking this option up from a ValueSource

Inheritors

StaticallyGroupedOption
Link copied to clipboard
OptionCallTransformContext
Link copied to clipboard
OptionTransformContext
Link copied to clipboard