macOS
by default does not have Bash
autocomplete feature at the terminal by default as Linux
distributions like Ubuntu
does. To enable it, you will have to install and enable bash-completion
program for macOS
which is available via Homebrew
.
bash-completion
can be installed and enabled in macOS
from the terminal.
Terminal
.Homebrew
by running the following commands. $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
bash-completion
via Homebrew
. $ brew install bash-completion
bash-completion
for current session. $ . /usr/local/etc/bash_completion
bash-completion
when launching a new shell session by adding the following lines to ~/.bashrc
or ~/.bash_profile
. [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
Comment anonymously. Login not required.