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

Re: Multi-Minute Startup?



On Thu, Aug 7, 2008 at 3:33 PM, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
> Something similar came up just under a month ago on this list:
>
> ==
> Eric D. Friedman wrote:
> Subject: new-style completion and large numbers of users
>
> I'm using zsh 4.2.0 on a machine with a very large number of users. When I
> first log on and do a completion of any kind, it triggers a cache-load of
> all of the user names, which is quite time consuming. I'd like to disable
> that behavior but can't see how to do it.  The archives have some ideas for
> old style completion but I didn't see anything for the new system.
> ==
>
> ==
> Angel Olivera replied:
>
> You can make zsh complete just the usernames you will be more likely to use
> with
>
> zstyle ':completion:*' users user1 user2
>
> Not specifying any users will effectively disable login name completions.
> See zshcompsys(1) for a description of this style.
> ==
>
> I forget the order of Zsh's startup files, but maybe you can slip a similar
> zstyle command into something that will run before your slow compaudit
> command that will prevent it from fetching all the groups.

According to the Files section of the manual, it goes

/etc/zshenv
~/.zshenv
/etc/zprofile
~/.zprofile
/etc/zshrc
~/.zshrc
/etc/zlogin
~/.zlogin

so presumably ~/.zshenv would work. however, putting

zstyle ':completion:*' users
zstyle ':completion:*' groups

in ~/.zshenv doesn't seem to help. Looking at compaudit itself, it
looks like it's still running "getent group".
-- 
Aaron Davies
aaron.davies@xxxxxxxxx



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