The following commit has been merged in the master branch:
commit 370ef61eba6deeaa6799653b7eb99f610da671ba
Author: Igor Murzov <[email protected]>
Date:   Fri Jan 28 06:08:43 2011 +0300

    Take package names from pkglist for slackpkg completion

diff --git a/completions/slackpkg b/completions/slackpkg
index b9263fe..f72d658 100644
--- a/completions/slackpkg
+++ b/completions/slackpkg
@@ -59,15 +59,13 @@ _slackpkg()
             _filedir
             COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x \
                 xap y' -- "$cur" ) )
-            COMPREPLY+=( $( sed -ne \
-                "/^PACKAGE NAME: *$cur/{s/^PACKAGE NAME: *//;p}" \
-                "${WORKDIR}/PACKAGES.TXT" 2>/dev/null ) )
+            COMPREPLY+=( $( cut -f 6 -d\  ${WORKDIR}/pkglist 2> /dev/null | \
+                grep "^$cur" ) )
             return 0
             ;;
         info)
-            COMPREPLY=( $( sed -ne \
-                "/^PACKAGE NAME: *$cur/{s/^PACKAGE NAME: *//;p}" \
-                "${WORKDIR}/PACKAGES.TXT" 2>/dev/null ) )
+            COMPREPLY+=( $( cut -f 6 -d\  ${WORKDIR}/pkglist 2> /dev/null | \
+                grep "^$cur" ) )
             return 0
             ;;
         update)

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to