diff --git a/README.md b/README.md index 86cf7f7..3ccfa96 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ To play around with it on the command line, it works just like tput: ``` bash $ tput.js setaf 2 $ tput.js sgr0 +$ echo "$(tput.js setaf 2)hello world$(tput.js sgr0)" ``` The higher level functionality is exposed in the main `blessed` module: diff --git a/bin/tput.js b/bin/tput.js index f5d7126..002795b 100755 --- a/bin/tput.js +++ b/bin/tput.js @@ -5,5 +5,5 @@ var tput = require('../lib/tput')(process.env.TERM || 'xterm') , cmd = argv.shift(); if (tput[cmd]) { - process.stdout.write(tput[cmd].apply(tput, argv)); + process.stdout.write(tput[cmd].apply(tput, argv) + '\n'); }