I like the Mac as a development environment most of the time, but occasionally some things annoy me.
One of these niggles is the way that the tab title in Terminal changes when you SSH to an external server, but doesn't change back when you close the connection. So you end up with tabs that claim to be connected to a server, but aren't.
The culprit seems to be SSH itself. Here's my solution: a shell script that runs SSH and then sets the tab title back to the default "Terminal".
1 2 3
#!/bin/sh ssh $* echo "\033]0;Terminal\007"
I've saved this to ~/bin/sshp, and made it executable, so now I just type
sshp myserver instead of ssh. A further step would be to alias it back to ssh in .bash_profile with