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

# If a parameter `users' exists and it is an array, we first try to
# complete only to its elements.

local expl

_tags any users || return 1

_description expl user

[[ "${(t)users}" = *array* ]] &&
    compadd "$expl[@]" "$@" - "$users[@]" && return 0

compadd "$@" "$expl[@]" - "${(@k)userdirs}"