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

Re: no "users" tag used in _users?



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



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