Skip to content

Instantly share code, notes, and snippets.

@johnrlive
Forked from samnang/gist:1759336
Last active February 2, 2019 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnrlive/2863412db66222d0ad4055ccd864ca78 to your computer and use it in GitHub Desktop.
Save johnrlive/2863412db66222d0ad4055ccd864ca78 to your computer and use it in GitHub Desktop.
Install Bash version 4 on MacOS X
# Install Bash 5 using homebrew
# brew install bash
# Or build bash 4 from source...
curl -O http://ftp.gnu.org/gnu/bash/bash-4.4.18.tar.gz
tar xzf bash-4.4.18.tar.gz
cd bash-4.4.18
./configure --prefix=/usr/local/bin && make && sudo make install
# Add the new shell to the list of legit shells
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
# Change the shell for the user
chsh -s /usr/local/bin/bash
# Restart terminal.app (new window works too)
# Check for Bash 4 and /usr/local/bin/bash...
echo $BASH && echo $BASH_VERSION
# Put this somewhere in your dotfiles to turn on recursive globbing
shopt -s globstar
# Source your dotfiles...
source path/to/dotfiles
# Now you can double glob your way into distant directories
cd some/uportal/project/root
cd **/skins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment