]>
Commit | Line | Data |
---|---|---|
31765dcc ER |
1 | # $Id$ |
2 | ||
3 | # Check for bash (and that we haven't already been sourced). | |
4 | [ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return | |
5 | ||
6 | # must be interactive shell, not script | |
7 | [[ $- = *i* ]] || return | |
8 | [ -n "$PS1" ] || return | |
9 | ||
10 | # Check for recent enough version of bash. | |
11 | bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} | |
12 | if [ "$bmajor" -eq 2 -a "$bminor" '>' 04 ] || [ "$bmajor" -gt 2 ]; then | |
13 | # Source completion code | |
14 | . /etc/bash_completion | |
15 | fi | |
16 | unset bash bminor bmajor |