Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: apt-cache search <TAB>



I found that `apt-cache search <TAB>' prints `no more arguments'.
But it takes a pattern as an argument.

Also, this removes debugging code from _regex_arguments.

Index: Completion/Debian/_apt
===================================================================
RCS file: /projects/zsh/zsh/Completion/Debian/_apt,v
retrieving revision 1.1.1.17
diff -u -r1.1.1.17 _apt
--- Completion/Debian/_apt	1999/12/27 21:22:24	1.1.1.17
+++ Completion/Debian/_apt	2000/01/19 01:04:35
@@ -419,7 +419,7 @@
     /$'dumpavail\0'/ \| \
     /$'unmet\0'/ \| \
     /$'check\0'/ \| \
-    /$'search\0'/ \| \
+    /$'search\0'/ /$'[^\0]#\0'/ :'_message "pattern"' \| \
     /$'show\0'/ /$'[^\0]#\0'/ :'_deb_packages "$expl_packages[@]" avail' \# \| \
     /$'depends\0'/ \| \
     /"[]"/ :'_tags actions && compadd "$expl_action[@]" help add gencaches showpkg stats dump dumpavail unmet check search show depends'
Index: Completion/Base/_regex_arguments
===================================================================
RCS file: /projects/zsh/zsh/Completion/Base/_regex_arguments,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 _regex_arguments
--- Completion/Base/_regex_arguments	1999/12/28 12:19:07	1.1.1.13
+++ Completion/Base/_regex_arguments	2000/01/19 01:04:34
@@ -77,7 +77,6 @@
       if [[ "$_ra_line[_ra_p1 + 1, -1]" = *$'\''\0'\''* ]]; then
 	_message "parse failed before current word"
       else
-	: $#PREFIX - $#_ra_line + $_ra_p1 : $_ra_p2
 	_ra_left="$_ra_line[_ra_p1 + 1, _ra_p2]"
 	_ra_right="$_ra_line[_ra_p2 + 1, -1]"
 	compset -p $(( $#PREFIX - $#_ra_line + $_ra_p1 ))
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author