Because /etc/profile.d/bash-completion.sh loads ~/.bash_completion.d/*, and because foo~ comes after foo, bash-completion is overridding my current foo completion with the backup my editor makes. Perhaps adding something like this? if [[ $f == *~ ]] || [[ $f == *.bak ]]; then continue fi We may want to include other common backup suffixes, and there may be a better way to do this. Reproducible: Always
Maybe you should persuade $EDITOR to use something more useful for backup files, like .${filename}.old or whatever. :)
(In reply to comment #0) > We may want to include other common backup suffixes, and there may be a better > way to do this. There does not exist an exhaustive list of backup suffixes so this "issue" will never end. Therefore, I'm not inclined to add hacks for one person's issue. By the way, you aren't suppose to be editting files in ~/.bash_completion.d/, there exists "eselect bashcomp enable foo" for a reason