diff options
author | David Paleino <dapal@debian.org> | 2010-06-16 18:20:29 +0200 |
---|---|---|
committer | David Paleino <dapal@debian.org> | 2010-06-16 18:20:29 +0200 |
commit | f9748115fb4b2950fb4df7535fb723c4affde078 (patch) | |
tree | 20875f42b219a5d56e8a7e98840f6dbced003ae0 /bash_completion.sh.in | |
parent | e5a9b6220e93ca656fd9774c6aefa78241edca6f (diff) | |
download | bash-completion-f9748115fb4b2950fb4df7535fb723c4affde078.tar.gz |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'bash_completion.sh.in')
-rw-r--r-- | bash_completion.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bash_completion.sh.in b/bash_completion.sh.in new file mode 100644 index 00000000..bdddeee0 --- /dev/null +++ b/bash_completion.sh.in @@ -0,0 +1,12 @@ +# Check for interactive bash and that we haven't already been sourced. +[ -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 -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then + if [ -r @sysconfdir@/bash_completion ]; then + # Source completion code. + . @sysconfdir@/bash_completion + fi +fi +unset bash bmajor bminor |