Shell completion for bash not working

Hi everyone,

I have followed the steps of the Mac documentation to install shell completion for bash and it looks like it doesn’t work.

Before following the steps I have checked that bash_completion.d/ was indeed located in /usr/local/etc/ and that $(brew --prefix) was equivalent to /usr/local/ but both code pieces to add to ~/.bash_profile haven’t had any effect (of course I tested by opening new tabs in my Terminal or by typing source ~/.bash_profile).

After reviewing the content of /usr/local/etc/ I think that I have found the root of the problem. There is a bash_completion.d/ folder but no file named bash_completion and find / -name "bash_completion"did not find it anywhere.

I use macOS 10.13.6 High Sierra.

Any help would be appreciated.
Thanks.

If you install bash-complete by brew install bash-completion, you can get the command under /usr/local/etc/, otherwise, you can brew remove bash-completion to delete the previous one and retry install it.

@Arthur or anyone else: Do I have to ‘cd’ to /usr/local/etc/ first or just run it from my default shell? I am working on Brett Fisher’s course and so far most of the things do not look even remotely similar, from the documentation to the Docker install, Docker app on splash screen launch.