#compdef newgrp
local expl
if (( ! $+groups )); then
if whence -p ypcat > /dev/null; then
: ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use NIS
else
: ${(A)groups:=${${(s: :)$(</etc/group)}%%:*}}
fi
fi
_description expl group
compadd "$@" "$expl[@]" - $groups