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('extension-provider-id', { provideTerminalCompletions(terminal, context) { return [{ label: '--help', replacementIndex: Math.max(0, context.cursorPosition - 2), replacementLength: 2 }]; }}); Copy
window.registerTerminalCompletionProvider('extension-provider-id', { provideTerminalCompletions(terminal, context) { return [{ label: '--help', replacementIndex: Math.max(0, context.cursorPosition - 2), replacementLength: 2 }]; }});
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