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

Re: How to turn off NIS hosts completion?



Peter Stephenson <pws <at> csr.com> writes:

> 
> Iain MacDonnell wrote:
> > Is there a way to turn off this NIS lookup for users and hosts?
> 
> There's a nasty but simple hack to turn off user name lookup.  The shell
> does the lookup via the special variable userdirs in the zsh/parameter
> module.  This declares itself in such a way that it can be overridden by
> a local user definition.  You can persuade the completion system to
> override it with an empty array by adding the following code to your own
> initialisation.  It goes at some point after the completion system has
> been loaded by "compinit":
> 
>   zmodload -i zsh/parameter
>   _comp_setup+=$'\ntypeset -a userdirs'

Yes, that did the trick!


> There's no such variable for hosts.  As far as I could see from the
> code, hosts are never looked up from NIS if the hosts style is set, as
> you have.

Right, I noticed later that it was only the users lookup that was still
happening.

I'd really like to find the time to understand how all of these new pieces
fit together. In the meantime, my immediate problem is solved.

Thanks, Peter!

    ~Iain







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