about summary refs log tree commit diff
path: root/Completion/User/_users
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_users')
-rw-r--r--Completion/User/_users12
1 files changed, 8 insertions, 4 deletions
diff --git a/Completion/User/_users b/Completion/User/_users
index fc1e87e52..d04731af9 100644
--- a/Completion/User/_users
+++ b/Completion/User/_users
@@ -1,6 +1,10 @@
-#autoload
+#compdef last passwd groups
 
-local expl
+local expl users
 
-_description expl user
-compgen "$@" "$expl[@]" -u
+_wanted users || return 1
+
+zstyle -a ":completion:${curcontext}:" users users &&
+    _all_labels users expl user compadd "$@" - "$users[@]" && return 0
+
+_all_labels users expl user compadd "$@" - "${(@k)userdirs}"