Skip to content

Instantly share code, notes, and snippets.

@johnd
Created July 9, 2011 14:12
Show Gist options
  • Save johnd/1073604 to your computer and use it in GitHub Desktop.
Save johnd/1073604 to your computer and use it in GitHub Desktop.
New prompt!
case "$UID" in
0)
user_colour="00;31"
;;
*)
user_colour="00;36"
;;
esac
case "$TERM" in
xterm-color)
PS1='\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007\[\033[${user_colour}m\]\u\[\033[00m\]@\[\033[00;36m\]\h\[\033[00m\]:\[\033[00;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='\u@\h:\w\$ '
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment