Saturday, March 09, 2013

bash tip: setting terminal tab title programatically

This one has been annoying me for quite a while - looking at the string of tabs in the mac's Terminal App, all of them titled "bash" except for the one trying to download webkit which is usefully titled "git".

So I finally decided to do something about it, namely google the solution. Here're the results:

As a bonus, the cd() function adds the ability to change the title to whatever directory you currently are on - which works just fine when you're in your projects directory :)

I think this should work on Linux as well; confirmation TBD.


No comments: