3 # Complete user/host combinations. Normally this looks for the style
4 # `users-hosts' for the tag `accounts'. A different tag may be given
6 # A `-' or `--' as the first argument is ignored.
8 local expl suf tag=accounts
10 if [[ "$1" = -t?* ]]; then
13 elif [[ "$1" = -t ]]; then
18 [[ "$1" = -(|-) ]] && shift
20 if [[ -prefix 1 *@ ]]; then
21 local user=${PREFIX%%@*}
25 _wanted -C user-at hosts expl "host for $user" \
26 _combination -s '[:@]' "${tag}" users-hosts users="$user" hosts "$@" -
28 compset -S '@*' || suf="@"
29 _wanted users expl "user" \
30 _combination -s '[:@]' "${tag}" users-hosts users -S "$suf" -q "$@" -