Create a gist now

Instantly share code, notes, and snippets.

Some git auto complete goodness
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