[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-235-g26ae770

Igor Murzov igor at gplsoft.org
Mon May 2 10:27:53 UTC 2011


The following commit has been merged in the master branch:
commit 370ef61eba6deeaa6799653b7eb99f610da671ba
Author: Igor Murzov <igor at gplsoft.org>
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



More information about the Bash-completion-commits mailing list