Better Bash 4 & Completions on OSX
OS X ships with an outdated version of Bash as its default shell. The preinstalled version dates back to 2007, yes - nearly a decade behind.
If you want to use an updated version of Bash and Bash Completions in your shell, you can install them by using Homebrew, a package manager for OS X.
Installing via Homebrew
Open your terminal and enter this command:
brew install bash Now we’ll append our desired (Bash 4) shell’s path to a file of whitelisted system shells, and then change the system shell for our user.