Created
October 27, 2014 21:01
-
-
Save nucliweb/b66498d1d47606e6d53f to your computer and use it in GitHub Desktop.
Git branch in promp
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
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\W\[\033[36m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# w <- For full path | |
#Color Code | |
#Black 0;30 | |
#Blue 0;34 | |
#Green 0;32 | |
#Cyan 0;36 | |
#Red 0;31 | |
#Purple 0;35 | |
#Brown 0;33 | |
#Blue 0;34 | |
#Green 0;32 | |
#Cyan 0;36 | |
#Red 0;31 | |
#Purple 0;35 | |
#Brown 0;33 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment