If you’re like me, you’ll have a terminal with dozen or so tabs open and you can’t remember which tab was which. The problem is even more annoying when you have some programs running on each tab and you can’t differentiate them.
By adding this oneliner to your ~/.bash_profile you can set the title for your terminal:
function title() { echo -n -e "\033]0;$@\007"; }
Just type “title something” and the title will change. Note that you need to apply the file by typing “. ~/.bash_profile” or by reopening the tab.