#a simple example .bashrc file if [ $TERM = "xterm" ] then # write current directory to xterm title # Escape sequence is: ESC]2;textC-G # and host name to icon # Escape sequence is: ESC]1;textC-G PROMPT_COMMAND=' A="~${PWD#$HOME}"; if [ $A = "~$PWD" ] ; then A="S:${PWD#$S}"; if [ $A = "S:$PWD" ] ; then A=$PWD; fi; fi; echo -n "]2;${HOST%%.*}: $A]1;${HOST%%.*}"' # enable application keypad. # Escape sequence is: ESC= echo -n "=" fi