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

PATCH: make _deb_packages handle -J



At some point _dpkg started passing '-J -default-' to _deb_packages,
and _deb_packages didn't like it.  Since this is intended as a temporary
solution, the option is not being passed along to compadd.

The result is that _apt and _dpkg will both work with _deb_packages.

Index: Completion/Debian/_deb_packages
===================================================================
RCS file: /cvs/zsh/zsh/Completion/Debian/_deb_packages,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _deb_packages
--- Completion/Debian/_deb_packages	1999/11/15 12:01:48	1.1.1.3
+++ Completion/Debian/_deb_packages	1999/12/27 02:52:55
@@ -1,6 +1,15 @@
 #autoload
 
+local opt caopts
+
 # Usage: _deb_packages installed|uninstalled|avail
+while getopts "J:" opt; do
+  case "$opt" in
+     J) caopts="-J $OPTARG"
+        shift 2			# presume that -J -default- are the first args
+        ;;
+  esac
+done
 
 if (( ! $+_deb_cache_dpkg_get_selections )); then
   _deb_cache_dpkg_get_selections=(



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