Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh sometimes freezes when completing a command
- X-seq: zsh-users 14944
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: zsh sometimes freezes when completing a command
- Date: Tue, 16 Mar 2010 01:35:10 -0400 (EDT)
- In-reply-to: <20100316035049.GD1761@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100315101546.GA28047@xxxxxxxxxxxxxxxxxxx> <100315085820.ZM6723@xxxxxxxxxxxxxxxxxxxxxx> <20100316001319.GC1761@xxxxxxxxxxxxxxxxxxx> <100315185415.ZM7280@xxxxxxxxxxxxxxxxxxxxxx> <20100316035049.GD1761@xxxxxxxxxxxxxxxxxxx>
On Tue, 16 Mar 2010, Vincent Lefevre wrote:
> On 2010-03-15 18:54:15 -0700, Bart Schaefer wrote:
> > On Mar 16, 1:13am, Vincent Lefevre wrote:
> > } tags in context :completion::complete:-command-::
> > }
> > } I wonder why zsh tries to complete on users.
> >
> > Targets for autocd, I suspect.
>
> Yes. But can't these targets be disabled for completion, or used only
> if the other completions failed?
From a similar discussion w/ subject: 'Avoid LDAP hit during
completion'[1], Peter's suggestion lead me tangentially to this section,
from somewhere in zshall (zstyle(?) .. Standard styles):
users This may be set to a list of usernames to be completed. If it
is not set all usernames will be completed. Note that if it is
set only that list of users will be completed; this is because
on some systems querying all users can take a prohibitive amount
of time.
E.g.: The following sets '~user' expansion to only use 'bhaskell' and
'dovecot' (random selection from my system):
zstyle ':completion:*' users {bhaskell,dovecot}
(OT: also surprised me to realize I have 30 'named directories' at this
point... ls ~<TAB> shows 32 items.)
As pws explained in much more detail in that thread, that might not be
the only place users would be generated. But, things also may have been
cleaned up since 2005.
And, you might also be better served changing this at a different level.
(Zsh isn't the only thing that can trigger a listing of usernames.) My
work computer is a Linux machine joined to a Windows Domain, and ls
~<Tab> didn't trigger any slowness. My Samba configuration there
(/etc/samba/smb.conf) has the following settings:
winbind enum users = No
winbind enum groups = No
winbind separator = .
getent passwd doesn't return the DOMAIN.username entries (due to the
'No' enum), but they're still perfectly usable as normal(-ish) system
users. (I can log in as DOMAIN.bhaskell via SSH, for example.)
Changing those lines got me back to slowness. (But even 280 domain
users doesn't take terribly long to enumerate there.)
--
Best,
Ben
[1] http://www.zsh.org/mla/users/2005/msg00659.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author