From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9715 invoked from network); 10 Sep 2009 09:31: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.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 10 Sep 2009 09:31:35 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99502 invoked from network); 10 Sep 2009 09:31:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Sep 2009 09:31:18 -0000 Received: (qmail 23395 invoked by alias); 10 Sep 2009 09:31:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27258 Received: (qmail 23375 invoked from network); 10 Sep 2009 09:31:13 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Sep 2009 09:31:13 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id D73128043ADF for ; Thu, 10 Sep 2009 11:30:55 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly12g.srv.mailcontrol.com (MailControl) with ESMTP id n8A9Ujad003540 for ; Thu, 10 Sep 2009 10:30:47 +0100 Received: from news01 ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 10 Sep 2009 10:30:12 +0100 Date: Thu, 10 Sep 2009 10:30:12 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: need help with enhancement to prevent completion from stat'ing automounts Message-ID: <20090910103012.64677425@news01> In-Reply-To: References: <19106.55413.238410.101865@gargle.gargle.HOWL> <20090908111200.57cadc7c@news01> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Sep 2009 09:30:12.0566 (UTC) FILETIME=[4C078760:01CA31F9] X-Scanned-By: MailControl A-09-22-01 (www.mailcontrol.com) on 10.71.0.122 X-Virus-Scanned: ClamAV 0.94.2/9791/Thu Sep 10 03:03:33 2009 on bifrost X-Virus-Status: Clean On Tue, 08 Sep 2009 19:39:21 -0400 Greg Klanderman wrote: > I'm quite certain that passing the 'fake' files and directories to > compadd would solve the problem here. I will acknowledge that IMO the > most correct change would be to introduce a 'fake-dirs' zstyle and fix > all of _path_files and compfiles to maintain these fake completions > separately so they can be given to compadd with the correct suffix > rather than '-f' when the time comes. > > But I find those two pieces of code so impenetrable that I'm having > trouble forcing myself down that path. And so another idea is to add > an array parameter, say completion_automount_roots, which I could > maybe set to (/net /home) and have bound to a C variable, then in the > ztat() function return 'directory' without stat()ing any files > directly under those roots. Not pretty, but I can see exactly what > needs to be done and it's not too hard. It's high time we fixed this properly. The whole problem with the completion system is arbitrary bits getting added without understanding the existing bits, and each time that happens it gets worse. Both Bart and I have been bamboozled by the networks of special cases and clever features in _path_files, but we need to track them down if we want to make file completion maintainable. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom