Skip to content

Instantly share code, notes, and snippets.

@peteroome
Created September 19, 2011 09:33
Show Gist options
  • Save peteroome/1226215 to your computer and use it in GitHub Desktop.
Save peteroome/1226215 to your computer and use it in GitHub Desktop.
Git Bash Autocompletion OS X Terminal Prompt
# Set git autocompletion and PS1 integration
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE=true
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
PS1='\[\033[39m\]\u@\h\[\033[00m\]:\[\033[39m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment