File: bash_completion.sh.in

package info (click to toggle)
bash-completion 1:2.1-4.3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,740 kB
  • sloc: exp: 8,230; makefile: 948; sh: 727; perl: 59; python: 26; xml: 13; ansic: 6
file content (16 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Check for interactive bash and that we haven't already been sourced.
if [ -n "$BASH_VERSION" -a -n "$PS1" -a -z "$BASH_COMPLETION_COMPAT_DIR" ]; then

# 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
    [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \
        . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
    if shopt -q progcomp && [ -r @pkgdatadir@/bash_completion ]; then
        # Source completion code.
        . @pkgdatadir@/bash_completion
    fi
fi
unset bash bmajor bminor

fi