summaryrefslogtreecommitdiff
path: root/recipes/bash-completion/files/bash_completion.sh
diff options
context:
space:
mode:
authorLukas Gorris <lukas.gorris@gmail.com>2009-03-30 21:20:14 +0200
committerLukas Gorris <lukas.gorris@gmail.com>2009-03-30 21:20:14 +0200
commita93dfebb9e7a34ffba9b1ae5e8e496dfab4c3c43 (patch)
tree6c38a4617c92398269e6603a0509fc3006811368 /recipes/bash-completion/files/bash_completion.sh
parent4255898da29e7e0c521d064afedbc4075b3e8155 (diff)
parentd7fdcef3d8c8b80926d579c2db179b594429cebe (diff)
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/bash-completion/files/bash_completion.sh')
-rw-r--r--recipes/bash-completion/files/bash_completion.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes/bash-completion/files/bash_completion.sh b/recipes/bash-completion/files/bash_completion.sh
new file mode 100644
index 0000000000..09715211c0
--- /dev/null
+++ b/recipes/bash-completion/files/bash_completion.sh
@@ -0,0 +1,12 @@
+# check for bash
+[ -z "$BASH_VERSION" ] && return
+
+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
+fi
+
+unset bash bmajor bminor
+