forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add proposed.terminalShellType.d.ts from @Tyriar in API to access the…
… shell type for a given terminal microsoft#230165
- Loading branch information
1 parent
73a79dd
commit 8ee3c1e
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* 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, | ||
CommandPrompt, | ||
PowerShell, | ||
GitBash, | ||
Bash, | ||
Zsh, | ||
Python, | ||
Julia, | ||
NuShell, | ||
Fish, | ||
Csh, | ||
Ksh | ||
} | ||
|
||
// NOTE: State since this 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}. | ||
* TODO: number is to prevent the breaking change when new enum members are added? | ||
*/ | ||
readonly shellType?: TerminalShellType | number | undefined; | ||
} | ||
|
||
} |