Add Git Bash Completion to Amazon Linux AMI

Add Git Bash Completion to Amazon Linux AMI

Here is a quick reference to adding Git Bash Completion to your Amazon AMI instance. If you are reading this, you have discovered that the yum repo in the AMI instance lacks bash-completion.

cd ~/
mkdir src
cd src

 

wget http://www.caliban.org/files/redhat/RPMS/noarch/bash-completion-20060301-1.noarch.rpm
rpm -ivh bash-completion-20060301-1.noarch.rpm
. /etc/bash_completion

 

curl -o ~/.git-prompt.sh https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh
Short URL: http://bit.ly/12d7eRJ

2 Comments

  1. Ad · November 10, 2015 Reply

    Or simply `sudo yum –enablerepo=epel -y install bash-completion`. Git completion works out of the box as well.

    • Lupius · March 18, 2016 Reply

      Thanks for the tip. Took me a while to figure out your comment got autocorrected so the double hyphen before “enablerepo” got squished into a dash.

Leave a reply