Created
June 23, 2011 17:24
-
-
Save putermancer/1043051 to your computer and use it in GitHub Desktop.
bash info in prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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