I am using following bash completions installed via brew:
.bashrc looks like:
if [ -f /usr/local/share/bash-completion/bash_completion ]; then
if [ -f /usr/local/Cellar/bash-completion/1.3_2/etc/bash_completion ]; then
The problem is when I press TAB on an empty prompt on keyboard I get the error:
-bash: words: bad array subscript
.bashrc error doesn’t happen but I miss out on many completions.
What is the problem here? How can I fix it?