Here is a prompt command which eats much less of a valuable space in window titlebars: PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' If something equivalent is desired which works with older versions of bash then more trickery is required: PROMPT_COMMAND='[ "${PWD}" = "${PWD#$HOME}" ] && \ echo -ne "\033]0;${HOSTNAME%%.*}:${PWD}\007" || \ echo -ne "\033]0;${HOSTNAME%%.*}:'"~"'${PWD#$HOME}\007"' Tested and submitted for a consideration. Michal michal
Changed to \033]0;${USER}@${HOSTNAME%%.*}: ${PWD/$HOME/"}\007 We'd like to keep the user name in there so you can immediately see which sessions are su'ed. (2.05-1)