From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1620 invoked from network); 8 Jun 2005 09:36:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Jun 2005 09:36:03 -0000 Received: (qmail 4890 invoked from network); 8 Jun 2005 09:35:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Jun 2005 09:35:54 -0000 Received: (qmail 18995 invoked by alias); 8 Jun 2005 09:35:47 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8983 Received: (qmail 18986 invoked from network); 8 Jun 2005 09:35:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Jun 2005 09:35:46 -0000 Received: (qmail 3802 invoked from network); 8 Jun 2005 09:35:46 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 8 Jun 2005 09:35:42 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 8 Jun 2005 10:33:48 +0100 Received: from csr.com ([10.102.144.127]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Jun 2005 10:35:55 +0100 To: zsh-users@sunsite.dk Subject: Re: Avoid LDAP hit during completion In-reply-to: <1e7d10fea1822db04c209365d48db60f@mac.com> References: <200506070926.j579QW1R022316@news01.csr.com> <2BEEA527-E202-4FC2-BF10-EEF108F473DB@mac.com> <1e7d10fea1822db04c209365d48db60f@mac.com> Comments: In-reply-to Chris wong message dated "Tue, 07 Jun 2005 16:19:44 -0700." Date: Wed, 08 Jun 2005 10:35:40 +0100 Message-ID: <20823.1118223340@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 08 Jun 2005 09:35:55.0332 (UTC) FILETIME=[77FC3840:01C56C0D] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Chris wong wrote: > Peter, thanks for the xtrace trick. Here is the partial output. The > completion slow down (or appeared to be frozen) at _all_labels:39, > (boxed up in asterisks below). Any help would be much appreciated. OK, so it was userdirs... You can relatively easily stop this happening for most contexts by copying the _users function to somewhere earlier in your $fpath and commenting out the last line. You can still have a list of specific users you want to complete, but it won't query the system. (If you have permission you can doctor _users in place, of course.) There are still other places that use userdirs. One is the _expand completer. If you use that you can do a similar trick by commenting out the complete expression in braces: { [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word [2,-1]}*]} -gt 1 ) || ( "$word" = *\$[a-zA-Z0-9_]## && ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 } You can decide if you need to worry about _tilde_files. I can see uses for a feature to override special parameters like userdirs selectively. Unfortunately the current state of the parameter code makes implementing this very hairy. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************