if [ ${TERM} == "xterm" ]; then xtitle() { echo -ne "\033]0;$1 $USER@$HOSTNAME:$PWD\007"; } trap 'xtitle "[$(history 1 | cut -b 8-30)]"' DEBUG fi