summaryrefslogtreecommitdiff
path: root/debian/bash_completion/bash_completion.sh
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-12 13:13:20 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-14 16:16:47 -0800
commitfc7695ee76400ee9833301f98a3fe483d64591b5 (patch)
tree15b568f5adfa956817cf9f5a1652c43d33d8efa9 /debian/bash_completion/bash_completion.sh
parentb7fc9e0f6d6105ba2203f219743d4b269415e84b (diff)
downloadvyatta-bash-fc7695ee76400ee9833301f98a3fe483d64591b5.tar.gz
vyatta-bash-fc7695ee76400ee9833301f98a3fe483d64591b5.zip
initial import from bash_3.1dfsg-8.diff.gzupstream
Diffstat (limited to 'debian/bash_completion/bash_completion.sh')
-rw-r--r--debian/bash_completion/bash_completion.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/bash_completion/bash_completion.sh b/debian/bash_completion/bash_completion.sh
new file mode 100644
index 0000000..cb85219
--- /dev/null
+++ b/debian/bash_completion/bash_completion.sh
@@ -0,0 +1,18 @@
+# $Id: bash_completion.sh,v 1.2 2006/02/25 01:21:33 ianmacd Exp $
+
+# Check for bash (and that we haven't already been sourced).
+[ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return
+
+# Check for recent enough version of bash.
+bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
+
+# Check for interactive shell.
+if [ -n "$PS1" ]; then
+ if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
+ if [ -r /etc/bash_completion ]; then
+ # Source completion code.
+ . /etc/bash_completion
+ fi
+ fi
+fi
+unset bash bminor bmajor