Skip to content

Instantly share code, notes, and snippets.

@y-takagi
y-takagi / install-git-completion.sh
Created September 22, 2011 08:32 — forked from abellmann/install-git-completion.sh
Mac OS X - Install Git Completion
GIT_VERSION=`git --version | awk '{print $3}'`
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash"
BASHRC="$HOME/.bashrc"
echo "Downloading git-completion for git version: $GIT_VERSION..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi