mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-29 16:25:35 +01:00
Merge of users/12154 by Ryan F: MacOS X group completion.
This commit is contained in:
parent
f2f4725b8e
commit
67ed8932af
1 changed files with 5 additions and 1 deletions
|
@ -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