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
bash-completion can be installed and enabled in
macOS from the terminal.
Steps to enable bash completion in macOS:
Homebrewby running the following commands.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install bash-completion
bash-completionfor current session.
$ . /usr/local/etc/bash_completion
bash-completionwhen launching a new shell session by adding the following lines to
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
Comment anonymously. Login not required.