summaryrefslogtreecommitdiff
path: root/extra/source/bash-completion
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committerEric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /extra/source/bash-completion
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'extra/source/bash-completion')
-rw-r--r--extra/source/bash-completion/bash-completion-xz.diff23
-rwxr-xr-xextra/source/bash-completion/bash-completion.SlackBuild50
-rw-r--r--extra/source/bash-completion/bash_completion.sh11
-rw-r--r--extra/source/bash-completion/slack-desc19
4 files changed, 103 insertions, 0 deletions
diff --git a/extra/source/bash-completion/bash-completion-xz.diff b/extra/source/bash-completion/bash-completion-xz.diff
new file mode 100644
index 00000000..3098aed1
--- /dev/null
+++ b/extra/source/bash-completion/bash-completion-xz.diff
@@ -0,0 +1,23 @@
+diff -ur a/bash_completion b/bash_completion
+--- a/bash_completion 2006-03-01 16:20:18.000000000 +0000
++++ b/bash_completion 2009-07-15 22:46:27.000000000 +0100
+@@ -2852,8 +2852,8 @@
+ return 0
+ ;;
+ +([^IZzjy])f)
+- ext='t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))'
+- regex='t\(ar\(\.\(Z\|gz\|bz2\?\)\)\?\|gz\|bz2\?\)'
++ ext='t@(ar?(.@(Z|xz|gz|bz?(2)))|xz|gz|bz?(2))'
++ regex='t\(ar\(\.\(Z\|xz\|gz\|bz2\?\)\)\?\|xz\|gz\|bz2\?\)'
+ ;;
+ *[Zz]*f)
+ ext='t?(ar.)@(gz|Z)'
+@@ -5519,7 +5519,7 @@
+ COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) )
+ } &&
+ complete -F _removepkg $filenames removepkg &&
+- complete $dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg
++ complete $dirnames -f -X '!*.t?z' installpkg upgradepkg explodepkg
+
+ # look(1) completion
+ #
diff --git a/extra/source/bash-completion/bash-completion.SlackBuild b/extra/source/bash-completion/bash-completion.SlackBuild
new file mode 100755
index 00000000..153853dc
--- /dev/null
+++ b/extra/source/bash-completion/bash-completion.SlackBuild
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-bash-completion
+
+VERSION=20060301
+ARCH=noarch
+BUILD=2
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP # location to build the source
+fi
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf bash_completion
+tar xjvf $CWD/bash-completion-$VERSION.tar.bz2
+cd bash_completion
+
+# Add support for xz file formats:
+zcat $CWD/bash-completion-xz.diff.gz | patch -p1 || exit 1
+
+mkdir -p $PKG/etc/bash_completion.d $PKG/etc/profile.d
+cp -a $CWD/bash_completion.sh.gz $PKG/etc/profile.d
+gzip -d $PKG/etc/profile.d/bash_completion.sh.gz
+chmod 755 $PKG/etc/profile.d/bash_completion.sh
+cp -a bash_completion $PKG/etc
+chmod 644 $PKG/etc/bash_completion
+cp -a contrib/* $PKG/etc/bash_completion.d
+chmod 755 $PKG/etc/bash_completion.d/*
+mkdir -p $PKG/usr/doc/bash-completion-$VERSION
+cp -a BUGS COPYING README $PKG/usr/doc/bash-completion-$VERSION
+chmod 644 $PKG/usr/doc/bash-completion-$VERSION/*
+( cd $PKG ; chown -R root.root . )
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/bash-completion-$VERSION-$ARCH-$BUILD.txz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/bash_completion
+ rm -rf $PKG
+fi
diff --git a/extra/source/bash-completion/bash_completion.sh b/extra/source/bash-completion/bash_completion.sh
new file mode 100644
index 00000000..84388cb8
--- /dev/null
+++ b/extra/source/bash-completion/bash_completion.sh
@@ -0,0 +1,11 @@
+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
+elif [ "$PS1" ] && [ $bmajor -eq 3 ] \
+ && [ -f /etc/bash_completion ]; then # interactive shell
+ # Source completion code
+ . /etc/bash_completion
+fi
+unset bash bmajor bminor
diff --git a/extra/source/bash-completion/slack-desc b/extra/source/bash-completion/slack-desc
new file mode 100644
index 00000000..b4ffbd4f
--- /dev/null
+++ b/extra/source/bash-completion/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bash-completion: bash-completion (programmable completion for the bash shell)
+bash-completion:
+bash-completion: Adds programmable completion to the bash shell. A new file called
+bash-completion: /etc/bash_completion will be sourced for interactive bash shells
+bash-completion: adding all sorts of enhanced command completion features. Once
+bash-completion: installed, you may get a list of all commands that have associated
+bash-completion: completions with 'complete -p', and examine the code for the shell
+bash-completion: functions with 'declare -f'.
+bash-completion:
+bash-completion: bash-completion was written by Ian Macdonald <ian@caliban.org>.
+bash-completion: