commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Found another way, more compatible. Tested with xterm, aterm, gnome-terminal and rxvt (where it sets the window title) and guake (where it doesn't - after all, guake does not show the window title).
Found the same command for zsh in http://www.davidpashley.com/articles/xterm-titles-with-bash.html - changed it a bit so that the behaviour is the same