Created
April 8, 2009 19:08
-
-
Save duff/91935 to your computer and use it in GitHub Desktop.
Some git auto complete goodness
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
source ~/bin/.git-completion.sh # Copied from the contrib/completion/git-completion.bash file in the git distribution (Also here: http://gist.github.com/91932) | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo '*' | |
} | |
PS1='\[\e[0m\][ \[\e[32m\]\w \[\e[0m\]]$(__git_ps1 " \[\e[33m\]%s$(parse_git_dirty)") \[\e[0m\]$ \[\e[0m\]' | |
alias bash_profile='vi ~/.bash_profile && source ~/.bash_profile' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment