Terminal lets you set the window title with some interesting options, but alas not the current directory. I wanted to move the current directory from the prompt to the window title. The downside is that you cannot copy the current working directory without typing pwd, but there are several upsides.
First there is the settitle function, which someone else wrote:
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }
This changes the title of the current window. In Terminal, this is the string you can set in the Window Settings that defaults to "Terminal" but not the whole window title.
function cd() { command cd "$@"; settitle `pwd -P`; }
Using command before cd forces bash to use the built-in instead of the function, so no infinite loop on cd. You could pass anything to settitle; this passes the current full path without links.
default: '\h:\w \u\$ '
export PS1='\h:\W \u\$ '
export PS1='\h:\u\$ '
The default is to have the full path after the hostname. The first option reduces the full path to the name of the current directory. The second option removes the path altogether.
settitle `pwd`
There are a lot of variations on how the path is derived and displayed, and what other information would be useful in the window title. Here is one last example that more closely matches the information in original prompt:
"${HOSTNAME%%.*}:${PWD/$HOME/~} $USER"
I assume that most people who would care about this also know where to place the above commands. But just in case, stick all the above code in either .bashrc or .profile in the home directory.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060502160527780