Files
vscode/src/vscode-dts/vscode.proposed.terminalShellType.d.ts
Anthony Kim 57e4810cae Expose shell type to extensions (#238071)
* copy everything from #237624

* try to better word notes in proposed.d.ts

* why is test being so flaky

* try sending one more text

* strictEqual only on isInteractedWith always fails

* update the name as recommended

* embed to make sure we are selecting event we are interested in as recommended

* add node as part of TerminalShellType

* getting type ..extHostTypes.TerminalShellType.Bash is not comparable to type ..vscode.TerminalShellType.Bash

* just use one enum?

* figured out how to get from extHostTypes

* clean up
2025-01-17 16:19:02 -05:00

41 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// https://github.com/microsoft/vscode/issues/230165
/**
* Known terminal shell types.
*/
export enum TerminalShellType {
Sh = 1,
Bash = 2,
Fish = 3,
Csh = 4,
Ksh = 5,
Zsh = 6,
CommandPrompt = 7,
GitBash = 8,
PowerShell = 9,
Python = 10,
Julia = 11,
NuShell = 12,
Node = 13
}
// Part of TerminalState since the shellType can change multiple times and this comes with an event.
export interface TerminalState {
/**
* The current detected shell type of the terminal. New shell types may be added in the
* future in which case they will be returned as a number that is not part of
* {@link TerminalShellType}.
* Includes number type to prevent the breaking change when new enum members are added?
*/
readonly shellType?: TerminalShellType | number | undefined;
}
}