#compdef newgrp local expl _wanted groups expl group || return 1 if (( ! $+groups )); then if (( ${+commands[ypcat]} )); then : ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use YP else : ${(A)groups:=${${(s: :)$(