mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-08 12:01:21 +02:00
Ryan F: users/12154: MacOS X group completion
This commit is contained in:
parent
8d22b3a4f8
commit
153f942d3e
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-11-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Ryan F: users/12154: Completion/Unix/Type/_groups: MacOS X
|
||||
group completion.
|
||||
|
||||
2007-11-26 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* unposted: Config/version.mk, Completion/Unix/Command/.distfiles:
|
||||
|
|
|
@ -7,7 +7,11 @@ _tags groups || return 1
|
|||
if ! zstyle -a ":completion:${curcontext}:" groups groups; then
|
||||
(( $+_cache_groups )) ||
|
||||
if [[ $OSTYPE = darwin* ]]; then
|
||||
: ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }}
|
||||
if (( ${+commands[lookupd]} )); then
|
||||
: ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }}
|
||||
elif (( ${+commands[dscacheutil]} )); then
|
||||
: ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups dscacheutil -q group)"}:#name*}##*: }}
|
||||
fi
|
||||
elif (( ${+commands[getent]} )); then
|
||||
: ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue