summaryrefslogtreecommitdiff
path: root/contrib/pkgtools
diff options
context:
space:
mode:
authorDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
committerDavid Paleino <d.paleino@gmail.com>2009-10-10 17:15:58 +0200
commite5a9b6220e93ca656fd9774c6aefa78241edca6f (patch)
tree4a65aa19b18fe2e8dcec24a1c97ce9746a6f91ff /contrib/pkgtools
parent96d00c3d7f1912d4f3f76f8ea21ef68d179b8b30 (diff)
downloadbash-completion-e5a9b6220e93ca656fd9774c6aefa78241edca6f.tar.gz
Imported Upstream version 1.1upstream/1.1
Diffstat (limited to 'contrib/pkgtools')
-rw-r--r--contrib/pkgtools22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/pkgtools b/contrib/pkgtools
new file mode 100644
index 00000000..c8092b7c
--- /dev/null
+++ b/contrib/pkgtools
@@ -0,0 +1,22 @@
+# bash completion for Slackware Linux pkgtools
+
+have removepkg && [ -f /etc/slackware-version ] &&
+_removepkg()
+{
+ local packages cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) )
+} &&
+complete -F _removepkg $filenames removepkg &&
+ complete $dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh