1 2 3 4 5 6 7 8 9
#compdef rlogin rsh ssh if [[ CURRENT -eq 2 ]]; then compgen -k hosts elif [[ CURRENT -eq 3 ]]; then compgen -k '(-l)' else compgen -u fi