more option completions

This commit is contained in:
Guillaume Rousse 2009-05-02 16:20:31 +02:00
parent d8bb766fbe
commit 4692a4b14a

View File

@ -15,23 +15,57 @@ _ssh()
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-F)
-@(F|i|S))
_filedir
return 0
;;
-c)
COMPREPLY=( $( compgen -W 'blowfish 3des 3des-cbc blowfish-cbc \
arcfour cast128-cbc' -- $cur ) )
COMPREPLY=( $( compgen -W '3des-cbc aes128-cbc aes192-cbc \
aes256-cbc aes128-ctr aes192-ctr aes256-ctr arcfour128 \
arcfour256 arcfour blowfish-cbc cast128-cbc' -- $cur ) )
return 0
;;
-i)
_filedir
-c)
COMPREPLY=( $( compgen -W 'hmac-md5 hmac-sha1 umac-64@openssh.com \
hmac-ripemd160 hmac-sha1-96 hmac-md5-96' -- $cur ) )
return 0
;;
-l)
COMPREPLY=( $( compgen -u -- $cur ) )
return 0
;;
-o)
COMPREPLY=( $( compgen -W 'AddressFamily BatchMode BindAddress \
ChallengeResponseAuthentication CheckHostIP Cipher Ciphers \
ClearAllForwardings Compression CompressionLevel \
ConnectionAttempts ConnectTimeout ControlMaster ControlPath \
DynamicForward EscapeChar ExitOnForwardFailure ForwardAgent \
ForwardX11 ForwardX11Trusted GatewayPorts GlobalKnownHostsFile \
GSSAPIAuthentication GSSAPIDelegateCredentials HashKnownHosts \
Host HostbasedAuthentication HostKeyAlgorithms HostKeyAlias \
HostName IdentityFile IdentitiesOnly KbdInteractiveDevices \
LocalCommand LocalForward LogLevel MACs \
NoHostAuthenticationForLocalhost NumberOfPasswordPrompts \
PasswordAuthentication PermitLocalCommand Port \
PreferredAuthentications Protocol ProxyCommand \
PubkeyAuthentication RekeyLimit RemoteForward \
RhostsRSAAuthentication RSAAuthentication SendEnv \
ServerAliveInterval ServerAliveCountMax SmartcardDevice \
StrictHostKeyChecking TCPKeepAlive Tunnel TunnelDevice \
UsePrivilegedPort User UserKnownHostsFile VerifyHostKeyDNS \
VisualHostKey XAuthLocation' -- $cur ) )
return 0
;;
-w)
_available_interfaces
return 0
;;
-b)
COMPREPLY=( $( compgen -W "$(/sbin/ifconfig | \
awk '/adr:/ {print $2}' | \
awk -F: '{print $2}' )" -- $cur ) )
return 0
;;
esac
if [[ "$cur" == -* ]]; then