1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 11:21:13 +02:00
zsh/Completion/User/_groups
1999-09-09 14:10:01 +00:00

14 lines
294 B
Text

#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