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

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