Description :

Le Bash completion est très utile quand on utilise de manière régulière un shell Bash.

Pré-requis :

Comme nous allons installer le bash completion via Brew, il faut que ce dernier soit installé.
Personnellement je l'ai installé ce dernier via ce Gist.

Installation :

 1 $ sudo brew install bash-completion
 2 Password:
 3 ==> Downloading https://homebrew.bintray.com/bottles/bash-completion-1.3.el_capitan.bottle.1.tar.gz
 4 ######################################################################## 100,0%
 5 ==> Pouring bash-completion-1.3.el_capitan.bottle.1.tar.gz
 6 ==> Caveats
 7 Add the following lines to your ~/.bash_profile:
 8   if [ -f $(brew --prefix)/etc/bash_completion ]; then
 9     . $(brew --prefix)/etc/bash_completion
10   fi
11 
12 Homebrew's own bash completion script has been installed to
13   /opt/homebrew/etc/bash_completion.d
14 
15 Bash completion has been installed to:
16   /opt/homebrew/etc/bash_completion.d
17 ==> Summary
18 🍺  /opt/homebrew/Cellar/bash-completion/1.3: 188 files, 1,1M

Comme indiqué, il faut ajouter les lignes suivantes à votre bash_profile :

1 if [ -f $(brew --prefix)/etc/bash_completion ]; then
2     . $(brew --prefix)/etc/bash_completion
3 fi

Pour la prise en compte du fichier, il suffit d'ouvrir un nouveau terminal ou de sourcer le bash_profile :

1 $ source ~/.bash_profile