]> git.pld-linux.org Git - packages/bash-completion.git/blob - bash-completion.sh
- fix /sbin/service completion
[packages/bash-completion.git] / bash-completion.sh
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
This page took 0.027847 seconds and 3 git commands to generate.