# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion.d/bash_completion.bash ]; then
. /usr/share/bash-completion/bash_completion.bash
elif [ -f /etc/bash_completion.d ]; then
. /etc/bash_completion.d
fi
fi
Apparently you have a typo somewhere in your .bashrc. Possibly an extra space before a 0? Possibly twice? Or something isn’t quoted or escaped properly.
That belongs to the bash-completion package which is imported from the Arch extra repo and is not modified in any way. I don’t think there’s anything wrong with it.
Do you use Timeshift? I have snapshots of .bashrc and .zshrc going back a few months… just saying
If you ever have a problem with .bashrc, browse your timeshift/snapshot folder and look for an older version and use something to compare them (I use meld).
What happens if you do mv .bashrc bashrc.BAD and then quit and open a new terminal?
ok, i believe i tracked down the source of the issue.
this file, /etc/bash.bashrc has the same ‘erroneous’ line as the default .bashrc file. (i.e. [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
I replaced that line with this (as per @Yochanan suggestion above):
# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion.d/bash_completion.bash ]; then
. /usr/share/bash-completion/bash_completion.bash
elif [ -f /etc/bash_completion.d ]; then
. /etc/bash_completion.d
fi
fi
I no longer receive bash: 0: command not found when opening terminals anymore.
Not sure if this issue is entirely resolved, as bash_completion still results in errors. but it seems that file does not get used anymore with the code snippets applied.