about summary refs log tree commit diff
path: root/Completion/User/_users_on
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_users_on')
-rw-r--r--Completion/User/_users_on8
1 files changed, 5 insertions, 3 deletions
diff --git a/Completion/User/_users_on b/Completion/User/_users_on
index 920688089..b19cff6e7 100644
--- a/Completion/User/_users_on
+++ b/Completion/User/_users_on
@@ -1,10 +1,12 @@
-#autoload write
+#compdef write
 
 local expl
 
+_wanted users || return 1
+
 if which users >/dev/null; then
-  _description expl users logged on
-  compadd "$@" "$expl[@]" - $(users) && return 0
+  _all_labels users expl 'users logged on' \
+      compadd "$@" - $(_call users users) && return 0
 else
   # Other methods of finding out users logged on should be added here
   return 1