Skip to content

CompletionContext ​

The input and partial command line being completed.

Signatures ​

ts
interface CompletionContext {}

Members ​

Properties ​

prefix ​

The value prefix typed before the cursor.

ts
prefix: string;

commandPath ​

Canonical command names, excluding the executable. Empty for a default command.

ts
commandPath: readonly string[];

input ​

The input whose value is being completed.

ts
input: { kind: "flag" | "arg"; name: string; };

argv ​

Arguments before the cursor, including the current partial token.

ts
argv: readonly string[];

env ​

Environment supplied to this execution.

ts
env: Readonly<Record<string, string | undefined>>;

See Also ​

Released under the MIT License.