bash < 3 support removal step 2: don't try to load on bash < 3.
This commit is contained in:
parent
a6cf003275
commit
1c53627fa2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user