Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Avoid LDAP hit during completion



Chris Wong wrote:
> For some reason, whenever I start a zsh shell, the first completion  
> will trigger many many LDAP lookup.
> 
> % cd foo<TAB>
> 
> As soon as I hit TAB, the shell appears as frozen, but at the  
> background, it's hitting the LDAP server of my company network.  This  
> will go one for a couple minutes, at least.  tcpdump and top revealed  
> that mystery to me.

Are you using the new completion system (with compinit)?  The best way
of tracking this down would be to see what the completion scripts are
doing.  You can arrange this with

_comp_setup="$_comp_setup
setopt xtrace"

This produces a huge amount of output so is useless for normal
completion but you should be able to see where the shell is pausing for
a long time.

-- 
Peter Stephenson <pws@xxxxxxx>                  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.

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



Messages sorted by: Reverse Date, Date, Thread, Author