Upgrading Bash Shell on MacOS
I finally took the time to deal with the warnings about ’nosort’ that were appearing every time I started the terminal on my Mac.
It turns out that MacOS comes with bash 3.x and a number of open
source tools assume you have at least bash 4.x and those tools will
setup up completions with the complete command and the nosort
option.
If you want to update to a recent bash version, you can do it via homebrew
$ brew install bash
On my machine, that ended up installed in /opt/homebrew/bin/bash. After trying it out, I ran this command:
sudo chsh -s /opt/homebrew/bin/bash "$USER"
Because MacOS considers this a nonstandard shell, I needed to use
sudo. And because I wanted to change the shell for me, not for
root, I specified "$USER"
Yes I have been ignoring the warnings to switch to zsh and now that I have my bash configuration working better again, I guess I’ll continue to ignore them.
You can leave me comments here.