From 0b787b5da25615fff4f41a1101a42f1ab142dcd4 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 3 Mar 2004 11:05:40 +0000 Subject: 19525: suppress compiler warnings and complete groups using lookupd on Mac OS --- Completion/Unix/Type/_groups | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Type/_groups') 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: :)$(