]> git.pld-linux.org Git - packages/bash-completion.git/blame - bash-completion.sh
- fix /sbin/service completion
[packages/bash-completion.git] / bash-completion.sh
CommitLineData
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.
11bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
12if [ "$bmajor" -eq 2 -a "$bminor" '>' 04 ] || [ "$bmajor" -gt 2 ]; then
13 # Source completion code
14 . /etc/bash_completion
15fi
16unset bash bminor bmajor
This page took 0.111746 seconds and 4 git commands to generate.