[Bash-completion-commits] [SCM] bash-completion branch, master, updated. eb5e62dec1119d8710368f844723900e2bdedfd4

Ville Skyttä ville.skytta at iki.fi
Thu Oct 22 09:12:02 UTC 2009


The following commit has been merged in the master branch:
commit 1c53627fa2936fe9fd9f472859b8cfd4077b054f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Oct 22 11:20:47 2009 +0300

    bash < 3 support removal step 2: don't try to load on bash < 3.

diff --git a/bash_completion.sh b/bash_completion.sh
index fad34c6..ee1220e 100644
--- a/bash_completion.sh
+++ b/bash_completion.sh
@@ -2,11 +2,9 @@
 [ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
 
 # Check for recent enough version of bash.
-bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
-if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
-    if [ -r /etc/bash_completion ]; then
-        # Source completion code.
-        . /etc/bash_completion
-    fi
+bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
+if [ $bmajor -ge 3 -a -r /etc/bash_completion ]; then
+    # Source completion code.
+    . /etc/bash_completion
 fi
-unset bash bminor bmajor
+unset bash bmajor

-- 
bash-completion



More information about the Bash-completion-commits mailing list