summaryrefslogtreecommitdiff
path: root/bash_completion.sh.in
blob: af6eb2c04a33d02125ef8af82d50fd40583c28a7 (plain)
1
2
3
4
5
6
7
8
9
10
# 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%.*}
if [ $bmajor -ge 3 -a -r @sysconfdir@/bash_completion ]; then
    # Source completion code.
    . @sysconfdir@/bash_completion
fi
unset bash bmajor