Skip to content

Instantly share code, notes, and snippets.

@rmm5t
Created September 26, 2009 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmm5t/194496 to your computer and use it in GitHub Desktop.
Save rmm5t/194496 to your computer and use it in GitHub Desktop.
# Change the window title of X terminals
case $TERM in
xterm*|rxvt|Eterm|eterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment