bash-completion/bash_completion.sh.in
2011-05-02 19:04:24 +02:00

13 lines
502 B
Bash

# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then
if shopt -q progcomp && [ -r @pkgdatadir@/bash_completion ]; then
# Source completion code.
. @pkgdatadir@/bash_completion
fi
fi
unset bash bmajor bminor