neo-blessed/bin/tput.js

17 lines
301 B
JavaScript
Raw Normal View History

2013-02-24 12:14:12 -06:00
#!/usr/bin/env node
2013-07-18 17:56:05 -05:00
var blessed = require('../')
2013-02-24 12:14:12 -06:00
, argv = process.argv.slice(2)
2015-02-07 15:07:32 -08:00
, cmd = argv.shift()
, tput;
tput = blessed.tput({
terminal: process.env.TERM,
2015-07-27 21:46:54 -07:00
termcap: !!process.env.USE_TERMCAP,
2015-02-07 15:07:32 -08:00
extended: true
});
2013-02-24 12:14:12 -06:00
if (tput[cmd]) {
2015-07-27 21:46:54 -07:00
process.stdout.write(tput[cmd].apply(tput, argv));
2013-02-24 12:14:12 -06:00
}