Created
November 22, 2012 17:11
-
-
Save fellix/4132182 to your computer and use it in GitHub Desktop.
my bash profile
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
source /usr/local/Cellar/git/1.7.11.3/etc/bash_completion.d/git-completion.bash | |
function git_branch_name(){ | |
git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /' | |
} | |
function show_colored_git_branch_in_prompt(){ | |
#PS1="\[\033[01;32m\]\u@\h:\[\033[01;34m\]\w\[\033[31m\]\$(git_branch_name)\[\033[m\]$ " | |
#PS1='\[\033[32m\]\u \033[34m\][\w]\[\033[00m\]:\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' | |
PS1='\[\033[32m\]\u \033[01;34m\][\w]\[\033[31m\]$(__git_ps1)\[\033[00m\] \$ ' | |
} | |
show_colored_git_branch_in_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment