# Bash Completion on OS X With Homebrew

Bash completion is one of those convenient features you forget about until you have to use a system where it’s not available. Recently, I found out that many homebrew formulas come with built-in support for bash completions. Assuming you already have homebrew installed, you’ll first install the bash-completion formula

\$ brew install bash-completion


Next, add the following line to your .bash_profile

[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion


Restart your shell, and that’s it! Now you should have bash completion support for git, bazel, and many other command line utilities.