summaryrefslogtreecommitdiff
path: root/packages/bash-completion/files/bash_completion.sh
blob: 09715211c00d7df252bccf42631cca038fdef7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# check for bash
[ -z "$BASH_VERSION" ] && return

bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
   && [ -f /etc/bash_completion ]; then # interactive shell
        # Source completion code
        . /etc/bash_completion
fi

unset bash bmajor bminor