Skip to content

Instantly share code, notes, and snippets.

@andywenk
Created September 7, 2013 08:09
Show Gist options
  • Save andywenk/6473801 to your computer and use it in GitHub Desktop.
Save andywenk/6473801 to your computer and use it in GitHub Desktop.
git_version() {
git --version | sed -e 's/.*\([0-9].[0-9].[0-9]\)/\1/'
}
if [ -f "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-completion.bash" ]; then
. "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-completion.bash"
fi
if [ -f "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-prompt.sh" ]; then
. "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-prompt.sh"
fi
. /usr/local/Library/Contributions/brew_bash_completion.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment