Skip to content

Instantly share code, notes, and snippets.

@mernen
Created December 24, 2008 02:30
Show Gist options
  • Save mernen/39566 to your computer and use it in GitHub Desktop.
Save mernen/39566 to your computer and use it in GitHub Desktop.
bashrc: colored and fairly compact PS1, and title
# colored prompt, with git support
PS1='\[\033[38m\]\u@\h \[\033[94m\]\W\[\033[95m\]$(__git_ps1)\[\033[37m\]$\[\033
[00m\] '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%.local}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment