提交 9a556522 编写于 作者: D Dirk Baeumer

Fixes #27338: Let the task framework configure 'Press any key to close the terminal'

上级 8f1fe44e
......@@ -109,8 +109,10 @@ export interface IShellLaunchConfig {
* shell is being launched by an extension).
*/
ignoreConfigurationCwd?: boolean;
/** Whether to wait for a key press before closing the terminal. */
waitOnExit?: boolean;
waitOnExit?: boolean | string;
/**
* A string including ANSI escape sequences that will be written to the terminal emulator
* _before_ the terminal process has launched, a trailing \n is added at the end of the string.
......
......@@ -529,7 +529,10 @@ export class TerminalInstance implements ITerminalInstance {
if (exitCode) {
this._xterm.writeln(exitCodeMessage);
}
this._xterm.writeln(nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal'));
let message = typeof this._shellLaunchConfig.waitOnExit === 'string'
? this._shellLaunchConfig.waitOnExit
: nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal');
this._xterm.writeln(message);
// Disable all input if the terminal is exiting and listen for next keypress
this._xterm.setOption('disableStdin', true);
if (this._xterm.textarea) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册