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
specification of the option whose value is being completed, or null when not completing an option value.
semantic position of the active completion token (e.g. COMMAND, SUBCOMMAND, OPTION_NAME, OPTION_VALUE, POSITIONAL_ARGUMENT, OPERATOR).
positional argument specification active at the cursor, or null if unspecified or variadic limit reached.
decoded prefix text that candidates must match, taking attached option value prefixes (--key=val) into account.
quote character enclosing the active token (' or "), or the null character \u0000 when unquoted.
matched root command specification, or null for unknown commands.
matched root-to-leaf command specification path reflecting the active subcommand hierarchy.
token index of the executable in the active command segment.
deepest matched command specification in commandPath, or null when no command spec was matched.
hidden-entry policy expected at the cursor.
file-system path kind expected at the cursor (e.g. FILE, DIRECTORY, FILE_OR_DIRECTORY, or NONE).
dynamic host-provided value domain expected at the cursor (e.g. GIT_BRANCH, ENVIRONMENT_VARIABLE, or NONE).
whether a -- token terminated option parsing before the cursor.
exclusive UTF-16 replacement end offset in the original request command line.
inclusive UTF-16 replacement start offset in the original request command line.
static candidate values declared by the active option or positional argument specification.
command specification whose subcommands are eligible for completion at the cursor.
identifiers of exclusive option groups already supplied before the cursor.