check for OSX terminal env variables.

This commit is contained in:
Christopher Jeffrey 2015-01-31 22:29:43 -08:00
parent 9589eb81d6
commit 8247501924
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ function Program(options) {
|| process.env.TERM
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
// OSX
this.isOSXTerm = process.env.TERM_PROGRAM === 'Apple_Terminal';
this.isiTerm2 = process.env.TERM_PROGRAM === 'iTerm.app'
|| !!process.env.ITERM_SESSION_ID;
// VTE
// NOTE: lxterminal does not provide an env variable to check for.
// NOTE: gnome-terminal and sakura use a later version of VTE
// which provides VTE_VERSION as well as supports SGR events.