Skip to content

Instantly share code, notes, and snippets.

@putermancer
Created June 23, 2011 17:24
Show Gist options
  • Save putermancer/1043051 to your computer and use it in GitHub Desktop.
Save putermancer/1043051 to your computer and use it in GitHub Desktop.
bash info in prompt
# prompt including cwd, username, hostname, git branch #
export PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]"
export SUDO_PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]"
# terminal colors #
export CLICOLOR='true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment