mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 05:28:19 -05:00
Fix circular import in terminal suggest
Found while trying to switch us to use esbuild for extension emit
This commit is contained in:
@@ -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',
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user