osx - How do you set the terminal tab title from Node.js? -


i'm aware can done manually terminal using:

echo -n -e "\033]0;my terminal tab title\007"

i tried putting console.log , process.stdout.write , fiddling escaping, can't work.

to save reading bit of time, here function in strict mode:

function setterminaltitle(title) {   process.stdout.write(     string.fromcharcode(27) + "]0;" + title + string.fromcharcode(7)   ); } 

Popular posts from this blog