1
0
forked from ports/opt

import bash-completion into opt

This commit is contained in:
Johannes Winkelmann 2005-11-09 22:13:14 +00:00
parent 3d9fb7f3d4
commit 1ec683533b
5 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,7 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/bash-completion/
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/bash-completion/
-rw-r--r-- root/root usr/share/bash-completion/bash_completion
-rwxr-xr-x root/root usr/share/bash-completion/init_bc

2
bash-completion/.md5sum Normal file
View File

@ -0,0 +1,2 @@
08e5321ead7079c84822368d7a41deda bash-completion-20050721.tar.gz
cee11381ec9d2dbe72e5c9d568bafa73 init_bc

15
bash-completion/Pkgfile Normal file
View File

@ -0,0 +1,15 @@
# Maintainer: Johannes Winkelmann, jw at tks6 dot net
# URL: http://www.caliban.org/bash/index.shtml#completion
# Description: Bash completion functions
name=bash-completion
version=20050721
release=1
source=(http://www.caliban.org/files/bash/$name-$version.tar.gz init_bc)
build() {
mkdir -p $PKG/usr/share/bash-completion
cp bash_completion/bash_completion $PKG/usr/share/bash-completion
install -m 0755 init_bc $PKG/usr/share/bash-completion
install -d -m 0755 $PKG/usr/lib/bash-completion
}

5
bash-completion/README Normal file
View File

@ -0,0 +1,5 @@
POST-INSTALL:
put the following line in your ~/.bashrc:
. /usr/share/bash-completion/init_bc
You can put additional init code into ~/.bash_completion

23
bash-completion/init_bc Normal file
View File

@ -0,0 +1,23 @@
#!/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