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

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