Add the following line to your ~/.bash_profile: [ -f /home/linuxbrew/.linuxbrew/etc/bash_completion ] && . /home/linuxbrew/.linuxbrew/etc/bash_completion Bash completion has been installed to: /home/linuxbrew/.linuxbrew/etc/bash_completion.d
As you can see, the recommended text to set up bash completion is not consistent with where bash completions are actually stored, you need to use
. $(brew --prefix)/etc/bash_completion.d/* – this also seems to be the case under macOS.
The instructions on brew.sh are also incorrect: https://docs.brew.sh/Shell-Completion