mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 11:21:13 +02:00
14 lines
294 B
Text
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
|