From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4217 invoked from network); 25 Jan 2009 12:20:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jan 2009 12:20:35 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 32630 invoked from network); 25 Jan 2009 12:20:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jan 2009 12:20:28 -0000 Received: (qmail 10522 invoked by alias); 25 Jan 2009 12:20:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26430 Received: (qmail 10508 invoked from network); 25 Jan 2009 12:20:24 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Jan 2009 12:20:24 -0000 Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by bifrost.dotsrc.org (Postfix) with ESMTP id B4A5180271F0 for ; Sun, 25 Jan 2009 13:20:17 +0100 (CET) Received: from torch.brasslantern.com ([96.238.220.215]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KE100CFZ0XJ44I0@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 25 Jan 2009 06:20:12 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n0PCK6D4025081 for ; Sun, 25 Jan 2009 04:20:07 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n0PCK5IA025080 for zsh-workers@sunsite.dk; Sun, 25 Jan 2009 04:20:05 -0800 Date: Sun, 25 Jan 2009 04:20:05 -0800 From: Bart Schaefer Subject: Re: completing automounts with fake-files setting hangs zsh In-reply-to: <18811.39531.84244.341828@gargle.gargle.HOWL> In-reply-to: To: Zsh list Message-id: <090125042005.ZM25079@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <18811.39531.84244.341828@gargle.gargle.HOWL> Comments: In reply to Greg Klanderman "completing automounts with fake-files setting hangs zsh" (Jan 24, 5:47pm) Comments: In reply to Greg Klanderman "Re: completing automounts with fake-files setting hangs zsh" (Jan 24, 10:45pm) X-Virus-Scanned: ClamAV 0.92.1/8901/Sun Jan 25 11:10:36 2009 on bifrost X-Virus-Status: Clean Back in August, 2007, I wrote: : Really this whole idea of attempting to complete things that don't : exist yet puts a huge amount of overhead on the cases where nothing : ever will. Now, I get to say, "Here we go again." On Jan 24, 5:47pm, Greg Klanderman wrote: } } Is the proper way to configure completion of automounts by using the } fake-files style setting? On Jan 24, 10:45pm, Greg Klanderman wrote: } } Further investigation seems to indicate that the problem lies in it } stat'ing all those "fake" files, and some of those stats are taking a } very long time. Is there some way to have it not do that? I don't know the specific method you're using to populate fake-files, but my suggested approach is to use "zstyle -e" to filter the value before returning it to the completion system. Remember completion is designed so that the shell functions typically collect all potential matches for a given situation and then leave it up to the internals to filter them against the command line. So if you are able to push some of that filtering into the functions by use of hooks like "zstyle -e", you can optimize much better than the generic internal filters are able.