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

Re: Slow completion when using aptitude



On Feb 5, 12:12pm, gi1242+zsh@xxxxxxxxx wrote:
}
} Any chance you can post the complete corrected file (or a diff to
} current git)?

Index: Completion/Debian/Type/_deb_packages
===================================================================
diff -c -r1.7 _deb_packages
--- _deb_packages	4 Nov 2008 04:47:52 -0000	1.7
+++ _deb_packages	4 Feb 2011 15:44:35 -0000
@@ -71,8 +71,10 @@
   _deb_packages_update_avail
   _deb_packages_update_installed
   if (( ! $+_deb_packages_cache_uninstalled )); then
+    # Package lists too large to efficiently diff with zsh expansion
     _deb_packages_cache_uninstalled=(
-      ${_deb_packages_cache_avail:#${(j:|:)~${_deb_packages_cache_installed:q}}}
+      $( print -l $_deb_packages_cache_avail |
+         fgrep -xvf =(print -l $_deb_packages_cache_installed) )
     )
   fi
   cachevar=_deb_packages_cache_uninstalled



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