about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2004-03-03 11:05:40 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2004-03-03 11:05:40 +0000
commit0b787b5da25615fff4f41a1101a42f1ab142dcd4 (patch)
treef80d2d865fa99e6d85eebe67fbe8e43e3ebd5fc2 /Completion
parent54af3ffed03e37e8f0749e032ab3aa3e6a06c41e (diff)
downloadzsh-0b787b5da25615fff4f41a1101a42f1ab142dcd4.tar.gz
zsh-0b787b5da25615fff4f41a1101a42f1ab142dcd4.tar.xz
zsh-0b787b5da25615fff4f41a1101a42f1ab142dcd4.zip
19525: suppress compiler warnings and complete groups using lookupd on Mac OS
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Type/_groups4
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)}%%:*}:#+}}