diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Type/_groups | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups index b6d599c28..6ba32f4f0 100644 --- a/Completion/Unix/Type/_groups +++ b/Completion/Unix/Type/_groups @@ -6,7 +6,9 @@ _tags groups || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || - if (( ${+commands[getent]} )); then + if [[ $OSTYPE = darwin* ]]; then + : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }} + elif (( ${+commands[getent]} )); then : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}} else : ${(A)_cache_groups:=${${${(s: :)$(</etc/group)}%%:*}:#+}} |