diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-06 16:05:48 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-06 16:05:48 +0000 |
commit | 2fa720395f4f2baa067798dadf710e623ce5253c (patch) | |
tree | c8e1da75c8fe3da8247953945a95fde6f0174990 /Completion/Unix/Type/_groups | |
parent | 5031b52277ad8a05fa6e91b3f07cc229bf63f2d4 (diff) | |
download | zsh-2fa720395f4f2baa067798dadf710e623ce5253c.tar.gz zsh-2fa720395f4f2baa067798dadf710e623ce5253c.tar.xz zsh-2fa720395f4f2baa067798dadf710e623ce5253c.zip |
new completion for useradd, groupmod etc and fix in _cvs (15574)
Diffstat (limited to 'Completion/Unix/Type/_groups')
-rw-r--r-- | Completion/Unix/Type/_groups | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups new file mode 100644 index 000000000..bbb80868b --- /dev/null +++ b/Completion/Unix/Type/_groups @@ -0,0 +1,19 @@ +#compdef newgrp groupdel + +local expl groups tmp + +_tags groups || return 1 + +if ! zstyle -a ":completion:${curcontext}:" groups groups; then + (( $+_cache_groups )) || + if (( ${+commands[ypcat]} )) && + tmp=$(_call_program groups ypcat group.byname 2>/dev/null); then + : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP + else + : ${(A)_cache_groups:=${${(s: :)$(</etc/group)}%%:*}} + fi + + groups=( "$_cache_groups[@]" ) +fi + +_wanted groups expl group compadd "$@" -a groups |