KetraTerm
API · v0.2.2All versions

TerminalOptionSpec

data class TerminalOptionSpec @JvmOverloads constructor(val names: List<String>, val description: String = "", val requiresValue: Boolean = false, val valuePathKind: TerminalPathArgumentKind = TerminalPathArgumentKind.NONE, val valueCandidates: List<String> = emptyList(), val valueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, val valueHiddenPathPolicy: TerminalHiddenPathPolicy = TerminalHiddenPathPolicy.DEFAULT, val exclusiveGroupIds: List<String> = emptyList())

Declarative option or flag specification.

Throws

if names are empty, or names, values, or exclusive-group identifiers contain blank entries.

Constructors

Link copied to clipboard
constructor(names: List<String>, description: String = "", requiresValue: Boolean = false, valuePathKind: TerminalPathArgumentKind = TerminalPathArgumentKind.NONE, valueCandidates: List<String> = emptyList(), valueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, valueHiddenPathPolicy: TerminalHiddenPathPolicy = TerminalHiddenPathPolicy.DEFAULT, exclusiveGroupIds: List<String> = emptyList())

Properties

Link copied to clipboard

short human-readable description.

Link copied to clipboard

identifiers of mutually exclusive option groups. Options that share any identifier cannot be suggested together once one has already been entered before the completion cursor.

Link copied to clipboard

accepted option tokens, such as --help and -h.

Link copied to clipboard

whether this option consumes the following token as a value.

Link copied to clipboard

static bounded option values, such as log levels or output modes. Dynamic host-owned domains belong in host providers instead.

Link copied to clipboard

dynamic host-owned value domain accepted by the option's separate value token when requiresValue is true.

Link copied to clipboard

hidden-entry policy used when valuePathKind accepts a path.

Link copied to clipboard

file-system path kind accepted by the option's separate value token when requiresValue is true.