about summary refs log tree commit diff
path: root/Completion/User/_rlogin
blob: e61890702fb29ff5a468d384a37156c4a0df75a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#compdef rlogin rsh ssh

local expl

_description expl user

if [[ CURRENT -eq 2 ]];
  if compset -P 1 '*@'; then
   _hosts
  else
    local nm=${compstate[nmatches]}
    _hosts
    [[ nm -eq compstate[nmatches] ]] && compgen "$expl[@]" -S @ -u
  fi
elif [[ CURRENT -eq 3 ]]; then
  compadd - -l
else
  _users -S @
fi