diff --git a/extensions/terminal-suggest/src/terminalSuggestMain.ts b/extensions/terminal-suggest/src/terminalSuggestMain.ts index 4cd66d7abc9..2839ee49926 100644 --- a/extensions/terminal-suggest/src/terminalSuggestMain.ts +++ b/extensions/terminal-suggest/src/terminalSuggestMain.ts @@ -249,7 +249,7 @@ export async function activate(context: vscode.ExtensionContext) { const shellType: string | undefined = 'shell' in terminal.state ? terminal.state.shell as string : undefined; const terminalShellType = getTerminalShellType(shellType); if (!terminalShellType) { - console.debug('#terminalCompletions No shell type found for terminal, shell:', shellType); + console.debug(`#terminalCompletions Shell type ${shellType} not supported`); return; } @@ -493,7 +493,7 @@ function getEnvAsRecord(shellIntegrationEnv: ITerminalEnvironment): Record { - test('getTerminalShellType should return appropriate shell types for supported shells', () => { - strictEqual(getTerminalShellType('bash'), TerminalShellType.Bash); - strictEqual(getTerminalShellType('zsh'), TerminalShellType.Zsh); - strictEqual(getTerminalShellType('fish'), TerminalShellType.Fish); - strictEqual(getTerminalShellType('pwsh'), TerminalShellType.PowerShell); - strictEqual(getTerminalShellType('gitbash'), TerminalShellType.GitBash); - }); - - test('getTerminalShellType should return undefined for Python REPLs', () => { - strictEqual(getTerminalShellType('python'), undefined, 'Python REPLs should not receive terminal-suggest completions'); - }); - - test('getTerminalShellType should return undefined for unsupported shells', () => { - strictEqual(getTerminalShellType('unsupported'), undefined); - strictEqual(getTerminalShellType(undefined), undefined); - strictEqual(getTerminalShellType(''), undefined); - }); -}); -