zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk
Subject: Re: Avoid LDAP hit during completion
Date: Wed, 08 Jun 2005 10:35:40 +0100	[thread overview]
Message-ID: <20823.1118223340@csr.com> (raw)
In-Reply-To: <1e7d10fea1822db04c209365d48db60f@mac.com>

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 <pws@csr.com>                  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.

**********************************************************************


  parent reply	other threads:[~2005-06-08  9:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-06 17:25 Chris Wong
2005-06-06 18:16 ` lists
2005-06-06 18:38   ` Chris wong
2005-06-07  9:26 ` Peter Stephenson
2005-06-07 10:24   ` Bart Schaefer
2005-06-07 12:33     ` lists
2005-06-07 16:27   ` Chris Wong
2005-06-07 23:19     ` Chris wong
2005-06-08  0:52       ` lists
2005-06-08  1:32         ` William Scott
2005-06-08  2:49           ` Bart Schaefer
2005-06-08  9:35       ` Peter Stephenson [this message]
2005-06-16  6:33         ` Chris Wong
2005-06-07 15:41 ` William Scott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20823.1118223340@csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).