1 2 3 4 5 6 7 8 9 10 11
# vim: ft=sh function settitle { echo -ne "\033]0;`whoami`@`hostname`:`pwd`\007" } case "$TERM" in xterm*|*rxvt*|*st*) trap 'settitle' DEBUG ;; esac