about summary refs log tree commit diff
path: root/Completion/Linux/Command/_gpasswd
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux/Command/_gpasswd')
-rw-r--r--Completion/Linux/Command/_gpasswd19
1 files changed, 5 insertions, 14 deletions
diff --git a/Completion/Linux/Command/_gpasswd b/Completion/Linux/Command/_gpasswd
index 9b4bedec6..24fe361b0 100644
--- a/Completion/Linux/Command/_gpasswd
+++ b/Completion/Linux/Command/_gpasswd
@@ -1,21 +1,12 @@
 #compdef gpasswd
-local curcontext=$curcontext state state_descr line
-typeset -A opt_args
 
-_arguments -C -w -s \
+_arguments -s \
   '(-a --add -d --delete)'{-a,--add}'[add user to group]: : _users' \
   '(-d --delete -a --add)'{-d,--delete}'[remove user from group]: : _users' \
-  '(-h --help)'{-h,--help}'[display help]' \
-  '(-Q --root)'{-Q,--root}'[directory to chroot into]: : _files -/' \
+  '(-)'{-h,--help}'[display help]' \
+  '(-Q --root)'{-Q,--root}'[specify directory to chroot into]: : _files -/' \
   '(-r --remove-password)'{-r,--remove-password}'[remove the group password]' \
   '(-R --restrict)'{-R,--restrict}'[restrict access to GROUP to its members]' \
-  '(-M --members -A --administrators)'{-M,--members}'[set the list of members of GROUP]: :->users' \
-  '(-A --administrators -M --members)'{-A,--administrators}'[set the list of admins for GROUP]: :->users' \
+  '(-M --members -A --administrators)'{-M,--members}'[set the list of members of GROUP]: :_sequence _users' \
+  '(-A --administrators -M --members)'{-A,--administrators}'[set the list of admins for GROUP]: :_sequence _users' \
   '1: : _groups'
-
-if [[ $state == users ]]; then
-  local -a ignore
-  compset -P '*,'; compset -S ',*'
-  ignore=( ${(s:,:)IPREFIX} ${(s:,:)ISUFFIX} )
-  _users -F ignore -qS ,
-fi