This is what I did in macOS to switch the shell shell from zsh to bash, restoring Homebrew paths, and enabling Colima command-line completion.
First, check your current shell:
echo $SHELLIf it still shows /bin/zsh, change it:
Using the system bash:
chsh -s /bin/bashOr using Homebrew’s newer bash (recommended):
brew install bash
sudo bash -c 'echo /opt/homebrew/bin/bash >> /etc/shells'
chsh -s /opt/homebrew/bin/bashThen restart Terminal.
Create or update your ~/.bash_profile with items from .zshrc. There may be some zsh specific commands that you'll need to account for
Homebrew wasn't setup in my bash environment so I had to add it:
Apple Silicon:
# Add to ~/.bash_profile or ~/.bashrc
eval "$(/opt/homebrew/bin/brew shellenv)"Intel Macs:
# Add to ~/.bash_profile or ~/.bashrc
eval "$(/usr/local/bin/brew shellenv)"Reload:
source ~/.bash_profileVerify:
which brewInstall bash completion:
brew install bash-completion@2Then add to your ~/.bash_profile or ~/.bashrc:
# Enable Homebrew bash-completion
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && \
source "/opt/homebrew/etc/profile.d/bash_completion.sh"For Intel Macs, replace /opt/homebrew with /usr/local.
Generate Colima’s bash completion script:
colima completion bash > ~/.colima_completeThen add to your ~/.bashrc:
# Colima CLI completion
if [ -f "$HOME/.colima_complete" ]; then
source "$HOME/.colima_complete"
fiReload the shell:
source ~/.bashrcNow try:
colima [TAB][TAB]