diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 5655fb15025..fef8db623f6 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -6599,10 +6599,11 @@ declare module 'vscode' { * * @param name Optional human-readable string which will be used to represent the terminal in the UI. * @param shellPath Optional path to a custom shell executable to be used in the terminal. - * @param shellArgs Optional args for the custom shell executable. + * @param shellArgs Optional args for the custom shell executable. A string can be used on Windows only which + * allows specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6). * @return A new Terminal. */ - export function createTerminal(name?: string, shellPath?: string, shellArgs?: string[]): Terminal; + export function createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): Terminal; /** * Creates a [Terminal](#Terminal). The cwd of the terminal will be the workspace directory diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 029ae87f218..67be3ea59bc 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -474,7 +474,7 @@ export function createApiFactory( createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel { return extHostWebviews.createWebviewPanel(extension, viewType, title, showOptions, options); }, - createTerminal(nameOrOptions?: vscode.TerminalOptions | string, shellPath?: string, shellArgs?: string[]): vscode.Terminal { + createTerminal(nameOrOptions?: vscode.TerminalOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { if (typeof nameOrOptions === 'object') { return extHostTerminalService.createTerminalFromOptions(nameOrOptions); } diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index b5a3737c6b6..de6e94d41c5 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -293,7 +293,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { this._proxy = mainContext.getProxy(MainContext.MainThreadTerminalService); } - public createTerminal(name?: string, shellPath?: string, shellArgs?: string[]): vscode.Terminal { + public createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { const terminal = new ExtHostTerminal(this._proxy, name); terminal.create(shellPath, shellArgs); this._terminals.push(terminal);