about summary refs log tree commit diff
path: root/Completion/User/_groups
blob: 61f63596ed490a3e644e05cd87bde51fe0815666 (plain) (blame)
1
2
3
4
5
6
7
8
9
#compdef newgrp

local expl

: ${(A)groups:=${${(s: :)$(</etc/group)}%%:*}}
# : ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use NIS

_description expl group
compadd "$@" "$expl[@]" - $groups