about summary refs log tree commit diff
path: root/Completion/User/_users
blob: a01227724d2e81b561bb951ca1dd57d46df7e898 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#compdef last

# 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