Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/externalTerminal/common/externalTerminal.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { createDecorator } from '../../instantiation/common/instantiation.js';
7
import { ITerminalEnvironment } from '../../terminal/common/terminal.js';
8
9
export const IExternalTerminalService = createDecorator<IExternalTerminalService>('externalTerminal');
10
11
export interface IExternalTerminalSettings {
12
linuxExec?: string;
13
osxExec?: string;
14
windowsExec?: string;
15
}
16
17
export interface ITerminalForPlatform {
18
windows: string;
19
linux: string;
20
osx: string;
21
}
22
23
export interface IExternalTerminalService {
24
readonly _serviceBrand: undefined;
25
openTerminal(configuration: IExternalTerminalSettings, cwd: string | undefined): Promise<void>;
26
runInTerminal(title: string, cwd: string, args: string[], env: ITerminalEnvironment, settings: IExternalTerminalSettings): Promise<number | undefined>;
27
getDefaultTerminalForPlatforms(): Promise<ITerminalForPlatform>;
28
}
29
30
export interface IExternalTerminalConfiguration {
31
terminal: {
32
explorerKind: 'integrated' | 'external' | 'both';
33
external: IExternalTerminalSettings;
34
};
35
}
36
37
export const DEFAULT_TERMINAL_OSX = 'Terminal.app';
38
39