KetraTerm
API · DevelopmentAll 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.

An active option owns its value's path kind, dynamic domain, and hidden-entry policy, including NONE and default values. Positional metadata is not used as a fallback for option values.

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

bounded, unescaped literal option values, such as log levels or output modes. Completion applies the request's shell quoting policy on insertion. 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.