Created
November 6, 2012 16:11
-
-
Save robballou/4025722 to your computer and use it in GitHub Desktop.
Current Bash prompt stylings
This file contains hidden or 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
# --------------------------------------------------------------------- | |
# colorize the prompt | |
# --------------------------------------------------------------------- | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} | |
GREEN_BOLD="\[\e[32;1;32m\]" | |
CLEAR="\[\e[m\]" | |
YELLOW="\[\033[0;33m\]" | |
export PS1="\u:$GREEN_BOLD\W$CLEAR$YELLOW\$(parse_git_branch)$CLEAR \$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment