zsh-workers
 help / color / mirror / code / Atom feed
* no "users" tag used in _users?
@ 2006-02-03 19:46 Danek Duvall
  2006-02-03 20:25 ` Danek Duvall
  0 siblings, 1 reply; 2+ messages in thread
From: Danek Duvall @ 2006-02-03 19:46 UTC (permalink / raw)
  To: zsh-workers

_users calls

    zstyle -a ":completion:${curcontext}:" users users

compared to _hosts, which calls

    zstyle -a ":completion:${curcontext}:hosts" hosts hosts

Is there some reason that _hosts uses the hosts tag, but _users doesn't use
the users tag?

Danek


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: no "users" tag used in _users?
  2006-02-03 19:46 no "users" tag used in _users? Danek Duvall
@ 2006-02-03 20:25 ` Danek Duvall
  0 siblings, 0 replies; 2+ messages in thread
From: Danek Duvall @ 2006-02-03 20:25 UTC (permalink / raw)
  To: zsh-workers

Also, it's frustrating that if what's on the commandline can't match to
something in the users style, then it necessarily looks in userdirs.  I'd
rewrite _users to be

    #compdef passwd groups userdel chage chfn chsh

    local expl users

    zstyle -a ":completion:${curcontext}:" users users && {
        _wanted users expl user compadd "$@" -a users
        return 0
    }

    _wanted users expl user compadd "$@" -k userdirs

(or something equivalent) to match _hosts.  Basically, groping through the
entire user or host lists in an environment that has about 50k entries in
each database is painful, even allowing for caching, so I want to have
styles that avoid this as much as possible.

Thanks,
Danek


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-03 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 19:46 no "users" tag used in _users? Danek Duvall
2006-02-03 20:25 ` Danek Duvall

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).