set-title for screen.

This commit is contained in:
Christopher Jeffrey 2013-04-28 17:39:46 -05:00
parent 110059704d
commit a1c82b1aa7
2 changed files with 14 additions and 0 deletions

View File

@ -970,6 +970,13 @@ Program.prototype.osc = function(code) {
// OSC Ps ; Pt BEL
// Set Text Parameters.
Program.prototype.setTitle = function(title) {
if (this.term('screen')) {
// Tmux pane
// if (process.env.TMUX) {
// return this.osc('2;' + title + '\x1b\\');
// }
return this.esc('k' + title + '\x1b\\');
}
return this.osc('0;' + title + '\x07');
};

View File

@ -10,6 +10,13 @@
// http://invisible-island.net/ncurses/man/term.5.html
// https://en.wikipedia.org/wiki/Terminfo
// Todo:
// - xterm's XT (set-title capability?) value should
// be true (at least tmux thinks it should).
// It's not parsed as true. Investigate.
// - Possibly switch to other method of finding the
// extended data string table: i += h.symOffsetCount * 2;
/**
* Modules
*/