Cara termudah adalah menginstal bash-completion
dari homebrew dan ikuti instruksi yang disediakan.
Contoh output:
==> Downloading https://homebrew.bintray.com/bottles/bash-completion-1.3.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring bash-completion-1.3.mavericks.bottle.tar.gz
==> Caveats
Add the following lines to your ~/.bash_profile:
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
source "$(brew --prefix)/etc/bash_completion"
fi
The Homebrew bash completion script has been installed to:
/usr/local/etc/bash_completion.d
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/bash-completion/1.3: 188 files, 1.1M
Setelah selesai, Anda dapat membuat skrip sendiri di bawah /usr/local/etc/bash_completion.d/
.