From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9441 invoked from network); 5 Sep 2009 21:37:26 -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.6 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; 5 Sep 2009 21:37:26 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4092 invoked from network); 5 Sep 2009 21:30:43 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Sep 2009 21:30:43 -0000 Received: (qmail 20142 invoked by alias); 5 Sep 2009 21:30:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27245 Received: (qmail 20122 invoked from network); 5 Sep 2009 21:30:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 5 Sep 2009 21:30:38 -0000 Received: from QMTA14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [76.96.59.212]) by bifrost.dotsrc.org (Postfix) with ESMTP id 741D98022642 for ; Sat, 5 Sep 2009 23:30:30 +0200 (CEST) Received: from OMTA24.westchester.pa.mail.comcast.net ([76.96.62.76]) by QMTA14.westchester.pa.mail.comcast.net with comcast id d9VP1c0021ei1Bg5E9WXMG; Sat, 05 Sep 2009 21:30:31 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA24.westchester.pa.mail.comcast.net with comcast id d9b31c0025M2Np63k9b3G3; Sat, 05 Sep 2009 21:35:03 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id 70C94B3014E; Sat, 5 Sep 2009 17:30:29 -0400 (EDT) Received: by lwm.klanderman.net (Postfix, from userid 500) id 4B5679FC5EB; Sat, 5 Sep 2009 17:30:29 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19106.55413.238410.101865@gargle.gargle.HOWL> Date: Sat, 5 Sep 2009 17:30:29 -0400 From: Greg Klanderman To: Zsh list Subject: need help with enhancement to prevent completion from stat'ing automounts Reply-To: gak@klanderman.net X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Virus-Scanned: ClamAV 0.94.2/9777/Sat Sep 5 00:17:01 2009 on bifrost X-Virus-Status: Clean Hi, I am finally getting back to an issue I posted about back in January. I am trying to use the fake-files zstyle to configure several hundred automounts under /net and /home. This mostly works, until zsh decides to stat them all in order to decide which suffix to use for completion. What's happening is something like this: 1. _path_files calls compfiles passing in the fake-files zstyle data. 2. by the time compfiles returns, all memory of which values in the result were "fake" has been lost. 3. eventually _path_files calls compadd with the '-f' argument and the completions, meaning that compadd will stat all the values to figure out which are directories and which are files, in order to add the correct suffix. 4. compadd stats the fake automount points, causing the automounter to potentially mount hundreds of locations (already not good), and hang for a very long while timing out on a few tens that no longer exist that our ops department has not cleaned up. I would like to create some configuration (via zstyle or whatever) to prevent zsh from stat'ing these locations, and just assume they are directories. I was able to hard-code some logic in the ztat() function in compresult.c which does exactly this for /net/* and /home/*, and it works perfectly. Now I just need some help to figure out what a reasonable way to create a general configuration to support this would be. thanks, Greg