FlagSpec

class FlagSpec(val names: List<String>, val help: String = "", val negationNames: List<String> = emptyList(), val default: Boolean = false) : ParamSpec

A named boolean parameter whose presence means true.

Parameters

names

the flag's names, primary first, for example ["--verbose", "-v"].

help

help text for --help.

negationNames

names that set the flag to false, for example ["--no-verbose"].

default

the value used when neither a name nor a negation name is present.

Constructors

Link copied to clipboard
constructor(names: List<String>, help: String = "", negationNames: List<String> = emptyList(), default: 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

The first of names, used as the lookup key in ParsedValues.