Blog 2019/4/24
<- previous | index | next ->
$ brew install bash-completion
You'll need to make sure /usr/local/etc/profile.d/* are being sourced.
I do this by using a ~/.bash_profile which looks like this:
source ${HOME}/.bashrc
for i in ${HOME}/.bash_profile.d/*
do
source "${i}"
doneand then creating ~/.bash_profile.d/homebrew.bash:
for i in `brew --prefix`/etc/profile.d/*
do
source "${i}"
done(I use the .bash vs. .sh convention to distinguish between "files which you can source" vs. "scripts which you can run".)
To test that this worked, start a new shell and type dd i<TAB><TAB>. The completion options should be ibs= if=.