Do not load bash_completion in profile.d script if progcomp is not enabled.

This commit is contained in:
Ville Skyttä 2010-12-18 12:56:28 +02:00
parent 0ceca807c5
commit 1110fcadb1
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ bash-completion (2.x)
dynamically when needed instead. dynamically when needed instead.
* Add/improve various autotools completions. * Add/improve various autotools completions.
* Add *.apk to unzip and jar filename completions. * Add *.apk to unzip and jar filename completions.
* Do not load bash_completion in profile.d script if progcomp is not enabled.
[ Freddy Vulto ] [ Freddy Vulto ]
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095) * Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)

View File

@ -4,7 +4,7 @@
# Check for recent enough version of bash. # Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then if [ $bmajor -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then
if [ -r @sysconfdir@/bash_completion ]; then if shopt -q progcomp && [ -r @sysconfdir@/bash_completion ]; then
# Source completion code. # Source completion code.
. @sysconfdir@/bash_completion . @sysconfdir@/bash_completion
fi fi