about summary refs log tree commit diff
path: root/Completion/User/_users
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-09 09:30:07 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-09 09:30:07 +0000
commit2aaebab3162c91cf44ea05e6dabae6c20894b5b0 (patch)
tree27e69802baa04b0468b6fd7bdb37c66febcfe8dc /Completion/User/_users
parentb6dd9af94235f6944970c8c16b329c78d2f6f6da (diff)
downloadzsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.gz
zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.xz
zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.zip
zsh-workers/7737
Diffstat (limited to 'Completion/User/_users')
-rw-r--r--Completion/User/_users7
1 files changed, 7 insertions, 0 deletions
diff --git a/Completion/User/_users b/Completion/User/_users
index fc1e87e52..b115cccdc 100644
--- a/Completion/User/_users
+++ b/Completion/User/_users
@@ -1,6 +1,13 @@
 #autoload
 
+# If a parameter `users' exists and it is an array, we first try to
+# complete only to its elements.
+
 local expl
 
 _description expl user
+
+[[ "${(t)users}" = *array* ]] &&
+    compadd "$expl[@]" "$@" - "$users[@]" && return 0
+
 compgen "$@" "$expl[@]" -u