summaryrefslogtreecommitdiff
path: root/bash_completion.sh.in
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-24 21:06:42 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-03-06 14:24:57 +0200
commit314cc0f13a9c8001f73e52bc00c1b8183f9d701e (patch)
tree1b8d72a3fe88193f8bd12a8a863fa6274b58d10f /bash_completion.sh.in
parentbc6f14445f26043c1c89cbb25caebe394fb7b03b (diff)
downloadbash-completion-314cc0f13a9c8001f73e52bc00c1b8183f9d701e.tar.gz
Drop support for bash < 3.2.
Diffstat (limited to 'bash_completion.sh.in')
-rw-r--r--bash_completion.sh.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/bash_completion.sh.in b/bash_completion.sh.in
index af6eb2c0..bdddeee0 100644
--- a/bash_completion.sh.in
+++ b/bash_completion.sh.in
@@ -2,9 +2,11 @@
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
# Check for recent enough version of bash.
-bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
-if [ $bmajor -ge 3 -a -r @sysconfdir@/bash_completion ]; then
- # Source completion code.
- . @sysconfdir@/bash_completion
+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
+ # Source completion code.
+ . @sysconfdir@/bash_completion
+ fi
fi
-unset bash bmajor
+unset bash bmajor bminor