提交 d60d8030 编写于 作者: D Daniel Imms

Split unixLike terminal setting into linux and osx

Fixes #6770
上级 f4748a9d
......@@ -13,7 +13,8 @@ export const TERMINAL_PANEL_ID = 'workbench.panel.terminal';
export const TERMINAL_SERVICE_ID = 'terminalService';
export const TERMINAL_DEFAULT_SHELL_UNIX_LIKE = process.env.SHELL || 'sh';
export const TERMINAL_DEFAULT_SHELL_LINUX = process.env.SHELL || 'sh';
export const TERMINAL_DEFAULT_SHELL_OSX = process.env.SHELL || 'sh';
export const TERMINAL_DEFAULT_SHELL_WINDOWS = platform.isWindows ? path.resolve(process.env.SystemRoot, 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe') : '';
export var ITerminalService = createDecorator<ITerminalService>(TERMINAL_SERVICE_ID);
......@@ -21,7 +22,8 @@ export var ITerminalService = createDecorator<ITerminalService>(TERMINAL_SERVICE
export interface ITerminalConfiguration {
integratedTerminal: {
shell: {
unixLike: string,
linux: string,
osx: string,
windows: string
},
fontFamily: string,
......
......@@ -11,7 +11,7 @@ import {registerSingleton} from 'vs/platform/instantiation/common/extensions';
import {IWorkbenchActionRegistry, Extensions as ActionExtensions} from 'vs/workbench/common/actionRegistry';
import {TerminalService} from 'vs/workbench/parts/terminal/electron-browser/terminalService';
import {ToggleTerminalAction} from 'vs/workbench/parts/terminal/electron-browser/terminalActions';
import {ITerminalService, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_SHELL_UNIX_LIKE, TERMINAL_DEFAULT_SHELL_WINDOWS} from 'vs/workbench/parts/terminal/common/terminal';
import {ITerminalService, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS} from 'vs/workbench/parts/terminal/common/terminal';
import * as panel from 'vs/workbench/browser/panel';
import {Registry} from 'vs/platform/platform';
import {Extensions, IConfigurationRegistry} from 'vs/platform/configuration/common/configurationRegistry';
......@@ -23,10 +23,15 @@ configurationRegistry.registerConfiguration({
'title': nls.localize('integratedTerminalConfigurationTitle', "Integrated terminal configuration"),
'type': 'object',
'properties': {
'integratedTerminal.shell.unixLike': {
'description': nls.localize('integratedTerminal.shell.unixLike', "The path of the shell that the terminal uses on Linux and OS X."),
'integratedTerminal.shell.linux': {
'description': nls.localize('integratedTerminal.shell.linux', "The path of the shell that the terminal uses on Linux."),
'type': 'string',
'default': TERMINAL_DEFAULT_SHELL_UNIX_LIKE
'default': TERMINAL_DEFAULT_SHELL_LINUX
},
'integratedTerminal.shell.osx': {
'description': nls.localize('integratedTerminal.shell.osx', "The path of the shell that the terminal uses on OS X."),
'type': 'string',
'default': TERMINAL_DEFAULT_SHELL_OSX
},
'integratedTerminal.shell.windows': {
'description': nls.localize('integratedTerminal.shell.windows', "The path of the shell that the terminal uses on Windows."),
......
......@@ -152,7 +152,10 @@ export class TerminalPanel extends Panel {
if (platform.isWindows) {
return config.integratedTerminal.shell.windows;
}
return config.integratedTerminal.shell.unixLike;
if (platform.isMacintosh) {
return config.integratedTerminal.shell.osx;
}
return config.integratedTerminal.shell.linux;
}
private getTerminalColors(): string[] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册