From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26856 invoked by alias); 4 Feb 2011 04:29:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28702 Received: (qmail 21889 invoked from network); 4 Feb 2011 04:29:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110203202907.ZM22434@torch.brasslantern.com> Date: Thu, 03 Feb 2011 20:29:07 -0800 In-reply-to: Comments: In reply to cheer_xiao "Re: Slow completion when using aptitude" (Feb 4, 11:48am) References: <87oc74dpuy.fsf@ft.bewatermyfriend.org> <87d3njemu9.fsf@ft.bewatermyfriend.org> <110126090508.ZM2111@torch.brasslantern.com> <110126092944.ZM2205@torch.brasslantern.com> <110129211610.ZM21714@torch.brasslantern.com> <110129231514.ZM21967@torch.brasslantern.com> <110130160220.ZM15815@torch.brasslantern.com> <110203065608.ZM21224@torch.brasslantern.com> <110203193315.ZM22047@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Slow completion when using aptitude MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 4, 11:48am, cheer_xiao wrote: } } >> Try the other way I suggested: } >> } >> _deb_packages_update_uninstalled () { } >> _deb_packages_update_avail } >> _deb_packages_update_installed } >> if (( ! $+_deb_packages_cache_uninstalled )); then } >> _dep_packages_cache_uninstalled=( } >> $( print -l $_deb_packages_cache_avail | } >> fgrep -vf =(print -l $_deb_packages_cache_installed) } > } > Seems you have missed a closing parenthesis at the end of line. } > } >> ) } >> fi } >> } } >> } > } > It's a wonderful fix. zsh now respond within 2 seconds. Thanks a lot! } > I wish to see the fix committed into the source repo ASAP. Also the } > completion for apt-get should behave the same. } } No... It didn't really work; the completion list was very, very } incomplete. "sudo aptitude install a" now brings up a list of } packages current *installed* instead *available*... Sorry about the cut'n'paste error with the close paren. As for the other part, try fgrep -xvf. If that still doesn't work, examine each of: print -l $_deb_packages_cache_avail print -l $_deb_packages_cache_installed print -l $_dep_packages_cache_uninstalled Do they appear to contain the lists you expect?