-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
bc04273
commit 57e4810
Showing
10 changed files
with
142 additions
and
11 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
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
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
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
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,40 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* 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; | ||
} | ||
|
||
} |