Modern Bash on OS X

Because Bash changed its license to GPLv3 it is not likely that Apple will update the builtin Bash anytime soon.

That is not really a problem because you just:

$ brew install bash
$ chsh -s /usr/local/bin/bash
$ sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'

and now you can use cool things like globstar, coproc, associative array, ...


Another problem that feels related to the shell is that at times is very slow to start up. This has been identified as loading of pam modules and looking up the last login time by parsing /var/log/asl/ logs.

The trick to avoid this unnecessary work is to have start a command that is not listed as a login shell in /etc/shells. This can be done by making a symbolic link:

$ ln -s /usr/local/bin/bash /usr/local/bin/bash-terminal-app

and configuring that as the command shells open with:

Shells open with: /usr/bin/bash

To suppress the 'Do you want to close this tab?' prompt when closing windows and tabs, you can add 'bash' to the list of exclusions, like so:

Ask before closing: Only if there are processes other than the login shell and: bash