about summary refs log tree commit diff
path: root/Completion/User/_users
blob: 45ed0f89dd2998df1c0f7a00a7514b1029f01a7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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 users

_wanted users expl user || return 1

zstyle -a ":completion${curcontext}:users" users users &&
    compadd "$expl[@]" "$@" - "$users[@]" && return 0

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