A provider that supplies terminal completion items.
Implementations of this interface should return an array of TerminalCompletionItem or a TerminalCompletionList describing completions for the current command line.
window.registerTerminalCompletionProvider({ provideTerminalCompletions(terminal, context) { return [{ label: '--help', replacementRange: [Math.max(0, context.cursorPosition - 2), context.cursorPosition] }]; }}); Copy
window.registerTerminalCompletionProvider({ provideTerminalCompletions(terminal, context) { return [{ label: '--help', replacementRange: [Math.max(0, context.cursorPosition - 2), context.cursorPosition] }]; }});
Provide completions for the given terminal and context.
The terminal for which completions are being provided.
Information about the terminal's current state.
A cancellation token.
A list of completions.
A provider that supplies terminal completion items.
Implementations of this interface should return an array of TerminalCompletionItem or a TerminalCompletionList describing completions for the current command line.
Example: Simple provider returning a single completion