提交 1df0f7bd 编写于 作者: D Daniel Imms

Update powershell names in shell selector

Advice from PS team

Fixes #94553
上级 fd5e37f0
......@@ -139,7 +139,7 @@ export interface ITerminalService {
*/
addLinkHandler(key: string, callback: TerminalLinkHandlerCallback): IDisposable;
selectDefaultWindowsShell(): Promise<void>;
selectDefaultShell(): Promise<void>;
setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void;
manageWorkspaceShellPermissions(): void;
......
......@@ -609,7 +609,7 @@ export class SelectDefaultShellWindowsTerminalAction extends Action {
}
public run(event?: any): Promise<any> {
return this._terminalService.selectDefaultWindowsShell();
return this._terminalService.selectDefaultShell();
}
}
......@@ -707,7 +707,7 @@ export class SwitchTerminalAction extends Action {
}
if (item === SelectDefaultShellWindowsTerminalAction.LABEL) {
this.terminalService.refreshActiveTab();
return this.terminalService.selectDefaultWindowsShell();
return this.terminalService.selectDefaultShell();
}
const selectedTabIndex = parseInt(item.split(':')[0], 10) - 1;
this.terminalService.setActiveTabByIndex(selectedTabIndex);
......
......@@ -584,8 +584,8 @@ export class TerminalService implements ITerminalService {
});
}
public async selectDefaultWindowsShell(): Promise<void> {
const shells = await this._detectWindowsShells();
public async selectDefaultShell(): Promise<void> {
const shells = await this._detectShells();
const options: IPickOptions<IQuickPickItem> = {
placeHolder: nls.localize('terminal.integrated.chooseWindowsShell', "Select your preferred terminal shell, you can change this later in your settings")
};
......@@ -607,7 +607,7 @@ export class TerminalService implements ITerminalService {
await this._configurationService.updateValue(`terminal.integrated.shell.${platformKey}`, shell, ConfigurationTarget.USER);
}
private _detectWindowsShells(): Promise<IShellDefinition[]> {
private _detectShells(): Promise<IShellDefinition[]> {
return new Promise(r => this._onRequestAvailableShells.fire({ callback: r }));
}
......
......@@ -109,8 +109,8 @@ async function detectAvailableWindowsShells(): Promise<IShellDefinition[]> {
const expectedLocations: { [key: string]: string[] } = {
'Command Prompt': [`${system32Path}\\cmd.exe`],
PowerShell: [`${system32Path}\\WindowsPowerShell\\v1.0\\powershell.exe`],
'PowerShell Core': [await getShellPathFromRegistry('pwsh')],
'Windows PowerShell': [`${system32Path}\\WindowsPowerShell\\v1.0\\powershell.exe`],
'PowerShell': [await getShellPathFromRegistry('pwsh')],
'WSL Bash': [`${system32Path}\\${useWSLexe ? 'wsl.exe' : 'bash.exe'}`],
'Git Bash': [
`${process.env['ProgramW6432']}\\Git\\bin\\bash.exe`,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册