File: bash_completion.sh.in

package info (click to toggle)
bash-completion 1%3A1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,508 kB
  • ctags: 24
  • sloc: exp: 5,659; sh: 741; makefile: 203; perl: 59
file content (12 lines) | stat: -rw-r--r-- 470 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
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