Skip to content

Instantly share code, notes, and snippets.

@emk
Created May 5, 2010 14:01
Show Gist options
  • Save emk/390802 to your computer and use it in GitHub Desktop.
Save emk/390802 to your computer and use it in GitHub Desktop.
Bash completion setup for git
# This must appear at the end of .bash_profile.
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
# This must appear after we set up bash_completion. It gives us a
# git-aware prompt string in the shell.
PS1='\u@\h \W$(__git_ps1 " (%s)")\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment