From 7074d0da9143a4317ac2110f16bcad990221ad12 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 16 Jul 2013 15:57:12 -0500 Subject: [PATCH] more terminfo paths. --- lib/program.js | 1 + lib/tput.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/program.js b/lib/program.js index aa08905..1ba98b2 100644 --- a/lib/program.js +++ b/lib/program.js @@ -1552,6 +1552,7 @@ Program.prototype.text = function(text, attr) { return this._attr(attr, true) + text + this._attr(attr, false); }; +// NOTE: sun-color may not allow multiple params for SGR. Program.prototype._attr = function(param, val) { var self = this , param = param || 'normal' diff --git a/lib/tput.js b/lib/tput.js index ccf0dc6..db7b52c 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -104,14 +104,16 @@ Tput.prototype.readTerminfo = function(data) { if (!data) { var file = this.terminfoFile || this._terminfoPrefix(this.terminfoPrefix) + || this._terminfoPrefix(process.env.TERMINFO) + || this._terminfoPrefix(process.env.TERMINFO_DIRS) + || this._terminfoPrefix(process.env.HOME + '/.terminfo') || this._terminfoPrefix('/usr/share/terminfo') || this._terminfoPrefix('/usr/share/lib/terminfo') || this._terminfoPrefix('/usr/lib/terminfo') || this._terminfoPrefix('/usr/local/share/terminfo') || this._terminfoPrefix('/usr/local/share/lib/terminfo') || this._terminfoPrefix('/usr/local/lib/terminfo') - || this._terminfoPrefix('/usr/local/ncurses/lib/terminfo') - || this._terminfoPrefix(process.env.HOME + '/.terminfo'); + || this._terminfoPrefix('/usr/local/ncurses/lib/terminfo'); data = fs.readFileSync(file); }