1
I am using following bash completions installed via brew: bash-completion
and bash-completion@2
. My .bashrc
looks like:
if [ -f /usr/local/share/bash-completion/bash_completion ]; then
. /usr/local/share/bash-completion/bash_completion
fi
if [ -f /usr/local/Cellar/bash-completion/1.3_2/etc/bash_completion ]; then
BASH_COMPLETION=/usr/local/Cellar/bash-completion/1.3_2/etc/bash_completion
. /usr/local/Cellar/bash-completion/1.3_2/etc/bash_completion
fi
The problem is when I press TAB on keyboard I get the error:
-bash: words: bad array subscript
What is the problem here? How can I fix it?
Update 1: After removing /usr/local/share/bash-completion/bash_completion
from .bashrc
error doesn't happen but I miss out on many completions.