diff options
Diffstat (limited to 'app-shells/bash-completion/files/bash-completion.sh')
-rw-r--r-- | app-shells/bash-completion/files/bash-completion.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app-shells/bash-completion/files/bash-completion.sh b/app-shells/bash-completion/files/bash-completion.sh index 36a194508a4e..fb99daee0b98 100644 --- a/app-shells/bash-completion/files/bash-completion.sh +++ b/app-shells/bash-completion/files/bash-completion.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.1 2006/11/20 23:06:15 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.2 2006/11/22 14:54:21 agriffis Exp $ # # START bash completion -- do not remove this line @@ -12,30 +12,36 @@ then declare f x loaded_pre=false for f; do if [[ -f $f ]]; then - # Some modules, including default, depend on the definitions + # Prevent loading base twice, initially and via glob + if $loaded_pre && [[ $f == */base ]]; then + continue + fi + + # Some modules, including base, depend on the definitions # in .pre. See the ebuild for how this is created. if ! $loaded_pre; then BASH_COMPLETION=/usr/share/bash-completion/base source /usr/share/bash-completion/.pre loaded_pre=true fi + source "$f" fi done # Clean up $loaded_pre && source /usr/share/bash-completion/.post - unset -f _load_completions + unset -f _load_completions # not designed to be called more than once } - # 1. Load defaults, if eselected. This was previously known as + # 1. Load base, if eselected. This was previously known as # /etc/bash_completion # 2. Load completion modules, maintained via eselect bashcomp --global # 3. Load user completion modules, maintained via eselect bashcomp # 4. Load user completion file last, overrides modules at user discretion _load_completions \ - /etc/bash_completion.d/default \ - ~/.bash_completion.d/default \ + /etc/bash_completion.d/base \ + ~/.bash_completion.d/base \ /etc/bash_completion.d/* \ ~/.bash_completion.d/* \ ~/.bash_completion |