summaryrefslogtreecommitdiffstats
path: root/extra/source/bash-completion/bash_completion.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/bash-completion/bash_completion.sh')
-rw-r--r--extra/source/bash-completion/bash_completion.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/extra/source/bash-completion/bash_completion.sh b/extra/source/bash-completion/bash_completion.sh
index 4f2cdf824..cb2adb673 100644
--- a/extra/source/bash-completion/bash_completion.sh
+++ b/extra/source/bash-completion/bash_completion.sh
@@ -1,11 +1,3 @@
-bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
-if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
- && [ -f /etc/bash_completion ]; then # interactive shell
- # Source completion code
- . /etc/bash_completion
-elif [ "$PS1" ] && [ $bmajor -ge 3 ] \
- && [ -f /etc/bash_completion ]; then # interactive shell
- # Source completion code
- . /etc/bash_completion
+if [ "$(basename $SHELL)" = "bash" -a -f /etc/bash_completion ]; then
+ . /etc/bash_completion
fi
-unset bash bmajor bminor