提交 9c82ae89 编写于 作者: M Matt Bierner 提交者: GitHub

Set TERM_PROGRAM in terminal (#30346)

* Set TERM_PROGRAM in terminal

Fixes #29426

Sets the TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables for the integrated terminal

* Use constant name for TERM_PROGRAM
上级 96157e55
......@@ -34,6 +34,7 @@ import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSli
import { TPromise } from 'vs/base/common/winjs.base';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IHistoryService } from 'vs/workbench/services/history/common/history';
import pkg from 'vs/platform/node/package';
/** The amount of time to consider terminal errors to be related to the launch */
const LAUNCHING_DURATION = 500;
......@@ -665,6 +666,8 @@ export class TerminalInstance implements ITerminalInstance {
const env = shell.env ? shell.env : TerminalInstance._cloneEnv(parentEnv);
env['PTYPID'] = process.pid.toString();
env['PTYSHELL'] = shell.executable;
env['TERM_PROGRAM'] = 'vscode';
env['TERM_PROGRAM_VERSION'] = pkg.version;
if (shell.args) {
if (typeof shell.args === 'string') {
env[`PTYSHELLCMDLINE`] = shell.args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册