#569638 bash-completion: allow alternate user completion file locations

#569638#5
Date:
2010-02-13 00:00:04 UTC
From:
To:
At the end of /etc/bash_completion, before all of the helpful utility
functions are unset, it sources the user completion file:

# source user completion file
[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \
    && . ~/.bash_completion

In this, $BASH_COMPLETION is the system bash completion file
(/etc/bash_completion). This forces the user configuration file to be
~/.bash_completion, but I'd really prefer if I could move it somewhere
(like under $HOME/etc). Even changing it to be something like:

# source user completion file
[ -n "$BASH_USER_COMPLETION" ] || BASH_USER_COMPLETION=~/.bash_completion
[ $BASH_COMPLETION != $BASH_USER_COMPLETION -a -r $BASH_USER_COMPLETION ] \
    && . $BASH_USER_COMPLETION

would be sufficient, and backwards-compatible.

Thanks,
Eric