diff --git a/extensions/terminal-suggest/src/constants.ts b/extensions/terminal-suggest/src/constants.ts index 3258ce1ce2f..f5f7591f553 100644 --- a/extensions/terminal-suggest/src/constants.ts +++ b/extensions/terminal-suggest/src/constants.ts @@ -8,3 +8,12 @@ export const enum SettingsIds { CachedWindowsExecutableExtensions = 'terminal.integrated.suggest.windowsExecutableExtensions', CachedWindowsExecutableExtensionsSuffixOnly = 'windowsExecutableExtensions', } + +export const enum TerminalShellType { + Bash = 'bash', + Fish = 'fish', + Zsh = 'zsh', + PowerShell = 'pwsh', + WindowsPowerShell = 'powershell', + GitBash = 'gitbash', +} diff --git a/extensions/terminal-suggest/src/env/pathExecutableCache.ts b/extensions/terminal-suggest/src/env/pathExecutableCache.ts index 8fae425393b..d27493917f5 100644 --- a/extensions/terminal-suggest/src/env/pathExecutableCache.ts +++ b/extensions/terminal-suggest/src/env/pathExecutableCache.ts @@ -5,12 +5,11 @@ import * as fs from 'fs/promises'; import * as vscode from 'vscode'; +import { SettingsIds, TerminalShellType } from '../constants'; import { isExecutable, WindowsExecutableExtensionsCache } from '../helpers/executable'; import { osIsWindows } from '../helpers/os'; -import type { ICompletionResource } from '../types'; import { getFriendlyResourcePath } from '../helpers/uri'; -import { SettingsIds } from '../constants'; -import { TerminalShellType } from '../terminalSuggestMain'; +import type { ICompletionResource } from '../types'; const isWindows = osIsWindows(); diff --git a/extensions/terminal-suggest/src/terminalSuggestMain.ts b/extensions/terminal-suggest/src/terminalSuggestMain.ts index c10d0012082..ee73be3ab03 100644 --- a/extensions/terminal-suggest/src/terminalSuggestMain.ts +++ b/extensions/terminal-suggest/src/terminalSuggestMain.ts @@ -35,14 +35,7 @@ import { getPwshGlobals } from './shell/pwsh'; import { getZshGlobals } from './shell/zsh'; import { defaultShellTypeResetChars, getTokenType, shellTypeResetChars, TokenType } from './tokens'; import type { ICompletionResource } from './types'; -export const enum TerminalShellType { - Bash = 'bash', - Fish = 'fish', - Zsh = 'zsh', - PowerShell = 'pwsh', - WindowsPowerShell = 'powershell', - GitBash = 'gitbash', -} +import { TerminalShellType } from './constants'; const isWindows = osIsWindows(); type ShellGlobalsCacheEntry = { diff --git a/extensions/terminal-suggest/src/test/tokens.test.ts b/extensions/terminal-suggest/src/test/tokens.test.ts index dc583a28b08..285b615aeef 100644 --- a/extensions/terminal-suggest/src/test/tokens.test.ts +++ b/extensions/terminal-suggest/src/test/tokens.test.ts @@ -6,7 +6,7 @@ import 'mocha'; import { strictEqual } from 'node:assert'; import { getTokenType, TokenType } from '../tokens'; -import { TerminalShellType } from '../terminalSuggestMain'; +import { TerminalShellType } from '../constants'; suite('Terminal Suggest', () => { test('simple command', () => { diff --git a/extensions/terminal-suggest/src/tokens.ts b/extensions/terminal-suggest/src/tokens.ts index 11a23f7ad43..ede1a063203 100644 --- a/extensions/terminal-suggest/src/tokens.ts +++ b/extensions/terminal-suggest/src/tokens.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { TerminalShellType } from './terminalSuggestMain'; +import { TerminalShellType } from './constants'; export const enum TokenType {