about summary refs log tree commit diff
path: root/Completion/User/_rlogin
blob: 8756ec42d682ad41cecf50a859103904f82f06ed (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
  compgen "$expl[@]" -S @ -u
fi