summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-12-18 12:56:28 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-12-18 12:56:28 +0200
commit1110fcadb18b86234763309b5bf6927f1deb480a (patch)
tree2ee3050e6e45c5ca9a84192614c62e39e4bf8c38
parent0ceca807c50f9cec823999e497f6842c3f16e6e5 (diff)
downloadbash-completion-1110fcadb18b86234763309b5bf6927f1deb480a.tar.gz
Do not load bash_completion in profile.d script if progcomp is not enabled.
-rw-r--r--CHANGES1
-rw-r--r--bash_completion.sh.in2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 51489daf..6f43f657 100644
--- a/CHANGES
+++ b/CHANGES
@@ -39,6 +39,7 @@ bash-completion (2.x)
dynamically when needed instead.
* Add/improve various autotools 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 ]
* Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
diff --git a/bash_completion.sh.in b/bash_completion.sh.in
index bdddeee0..f6a983fb 100644
--- a/bash_completion.sh.in
+++ b/bash_completion.sh.in
@@ -4,7 +4,7 @@
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
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.
. @sysconfdir@/bash_completion
fi