diff options
| author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-09 09:30:07 +0000 |
|---|---|---|
| committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-09 09:30:07 +0000 |
| commit | 2aaebab3162c91cf44ea05e6dabae6c20894b5b0 (patch) | |
| tree | 27e69802baa04b0468b6fd7bdb37c66febcfe8dc /Completion/User/_users | |
| parent | zsh-workers/7736 (diff) | |
| download | zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.gz zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.bz2 zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.lz zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.xz zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.tar.zst zsh-2aaebab3162c91cf44ea05e6dabae6c20894b5b0.zip | |
zsh-workers/7737
Diffstat (limited to 'Completion/User/_users')
| -rw-r--r-- | Completion/User/_users | 7 |
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 |
