Created
November 6, 2011 19:44
-
-
Save ctide/1343369 to your computer and use it in GitHub Desktop.
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
function parse_git_branch_and_add_brackets { | |
/usr/bin/git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/' | |
} | |
NM="\[\033[0;38m\]" #means no background and white lines | |
HI="\[\033[0;37m\]" #change this for letter colors | |
HII="\[\033[0;31m\]" #change this for letter colors | |
HIB="\[\033[0;32m\]" #change this for bg colors | |
SI="\[\033[0;33m\]" #this is for the current directory | |
IN="\[\033[0m\]" | |
export PS1="$NM[$HI\u@$HII\h $SI\w$NM]$HIB\$(parse_git_branch_and_add_brackets)$IN:~\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment