From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 663 invoked from network); 16 Jun 2005 06:33:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Jun 2005 06:33:34 -0000 Received: (qmail 29601 invoked from network); 16 Jun 2005 06:33:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jun 2005 06:33:26 -0000 Received: (qmail 21693 invoked by alias); 16 Jun 2005 06:33:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8991 Received: (qmail 21683 invoked from network); 16 Jun 2005 06:33:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Jun 2005 06:33:18 -0000 Received: (qmail 28548 invoked from network); 16 Jun 2005 06:33:18 -0000 Received: from smtpout.mac.com (17.250.248.72) by a.mx.sunsite.dk with SMTP; 16 Jun 2005 06:33:13 -0000 Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/8.12.11/smtpout15/MantshX 4.0) with ESMTP id j5G6XBB8001462 for ; Wed, 15 Jun 2005 23:33:11 -0700 (PDT) Received: from [24.41.33.25] (user-0c2i88p.cable.earthlink.net [24.41.33.25]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id j5G6X9Sx027360 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 15 Jun 2005 23:33:11 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v730) In-Reply-To: <20823.1118223340@csr.com> References: <200506070926.j579QW1R022316@news01.csr.com> <2BEEA527-E202-4FC2-BF10-EEF108F473DB@mac.com> <1e7d10fea1822db04c209365d48db60f@mac.com> <20823.1118223340@csr.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chris Wong Subject: Re: Avoid LDAP hit during completion Date: Wed, 15 Jun 2005 23:33:07 -0700 To: zsh-users@sunsite.dk X-Mailer: Apple Mail (2.730) 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 Peter, My apology for the late reply. I was out of town for a few days. I tried your suggested solution and now it doesn't seem to hit LDAP any more. Thank you so much. Chris On Jun 8, 2005, at 2:35 AM, Peter Stephenson wrote: > 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. > > ********************************************************************** > >