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); }