KetraTerm
API · v0.3.0All versions

TerminalCompletionContext

One parsed, spec-resolved completion context shared by every source.

The merged engine constructs this object once per request. Source implementations consume it directly to determine eligibility, prefix matching, replacement ranges, and semantic argument kinds without re-tokenizing the command line.

Properties

Link copied to clipboard

specification of the option whose value is being completed, or null when not completing an option value.

Link copied to clipboard

semantic position of the active completion token (e.g. COMMAND, SUBCOMMAND, OPTION_NAME, OPTION_VALUE, POSITIONAL_ARGUMENT, OPERATOR).

Link copied to clipboard

positional argument specification active at the cursor, or null if unspecified or variadic limit reached.

Link copied to clipboard

decoded prefix text that candidates must match, taking attached option value prefixes (--key=val) into account.

Link copied to clipboard

quote character enclosing the active token (' or "), or the null character \u0000 when unquoted.

Link copied to clipboard

matched root command specification, or null for unknown commands.

Link copied to clipboard

matched root-to-leaf command specification path reflecting the active subcommand hierarchy.

Link copied to clipboard

token index of the executable in the active command segment.

Link copied to clipboard

deepest matched command specification in commandPath, or null when no command spec was matched.

Link copied to clipboard

hidden-entry policy expected at the cursor.

Link copied to clipboard

file-system path kind expected at the cursor (e.g. FILE, DIRECTORY, FILE_OR_DIRECTORY, or NONE).

Link copied to clipboard

dynamic host-provided value domain expected at the cursor (e.g. GIT_BRANCH, ENVIRONMENT_VARIABLE, or NONE).

Link copied to clipboard

whether a -- token terminated option parsing before the cursor.

Link copied to clipboard

exclusive UTF-16 replacement end offset in the original request command line.

Link copied to clipboard

inclusive UTF-16 replacement start offset in the original request command line.

Link copied to clipboard

static candidate values declared by the active option or positional argument specification.

Link copied to clipboard

command specification whose subcommands are eligible for completion at the cursor.

Link copied to clipboard

identifiers of exclusive option groups already supplied before the cursor.