opt/bash-completion/init_bc
2006-02-23 15:26:10 +00:00

24 lines
643 B
Bash

#!/bin/sh
export BASH_COMPLETION=/usr/share/bash-completion/bash_completion
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
&& [ -f "$BASH_COMPLETION" ]; then # interactive shell
# Source completion code
. $BASH_COMPLETION
fi
# also support bash v3...
if [ "$PS1" ] && [ $bmajor -eq 3 ] && [ -f "$BASH_COMPLETION" ]; then
# interactive shell
. $BASH_COMPLETION
fi
unset bash bmajor bminor
files=`find /usr/lib/bash-completion/ -type f`
if [ ! "$files" = "" ]; then
for f in /usr/lib/bash-completion/*; do
. $f
done
fi