#compdef conch _arguments -s -A "-*" \ '1:host | user@host:{_ssh;if compset -P "*@"; then _wanted hosts expl "remote host name" _ssh_hosts && ret=0 elif compset -S "@*"; then _wanted users expl "login name" _ssh_users -S "" && ret=0 else if (( $+opt_args[-l] )); then tmp=() else tmp=( "users:login name:_ssh_users -qS@" ) fi; _alternative "hosts:remote host name:_ssh_hosts" "$tmp[@]" && ret=0 fi}' \ '*:command: ' \ '(--fork)-f[Fork to background after authentication.]' \ '(-f)--fork[Fork to background after authentication.]' \ '(--subsystem)-s[Invoke command (mandatory) as SSH2 subsystem.]' \ '(-s)--subsystem[Invoke command (mandatory) as SSH2 subsystem.]' \ '(--tty)-t[Tty; allocate a tty even if command is given.]' \ '(-t)--tty[Tty; allocate a tty even if command is given.]' \ '(--agent -A --noagent)-a[Disable authentication agent forwarding (default)]' \ '(--agent -A -a)--noagent[Disable authentication agent forwarding (default)]' \ "(--macs)-m[Specify MAC algorithms]:macs:_values -s , 'macs to choose from' hmac-sha1 none hmac-md5" \ "(-m)--macs=[Specify MAC algorithms]:macs:_values -s , 'macs to choose from' hmac-sha1 none hmac-md5" \ '(--option)-o[Ignored OpenSSH options]:option:_files' \ '(-o)--option=[Ignored OpenSSH options]:option:_files' \ "--host-key-algorithms=[Select host key algorithms]:host-key-algorithms:_values -s , 'host key algorithms to choose from' ssh-rsa ssh-dss" \ '--user-authentications=[Types of user authentications to use.]:user-authentications:_files' \ "(--ciphers)-c[Select encryption algorithms]:ciphers:_values -s , 'ciphers to choose from' idea-ctr blowfish-ctr none arcfour aes256-ctr cast128-ctr idea-cbc blowfish-cbc 3des-cbc aes256-cbc 3des-ctr cast128-cbc aes128-ctr aes192-cbc aes192-ctr aes128-cbc" \ "(-c)--ciphers=[Select encryption algorithms]:ciphers:_values -s , 'ciphers to choose from' idea-ctr blowfish-ctr none arcfour aes256-ctr cast128-ctr idea-cbc blowfish-cbc 3des-cbc aes256-cbc 3des-ctr cast128-cbc aes128-ctr aes192-cbc aes192-ctr aes128-cbc" \ '(--compress)-C[Enable compression.]' \ '(-C)--compress[Enable compression.]' \ '(--noagent -a --agent)-A[Enable authentication agent forwarding]' \ '(--noagent -a -A)--agent[Enable authentication agent forwarding]' \ '--known-hosts=[File to check for host keys]:known-hosts:_files' \ '(--notty)-T[Do not allocate a tty.]' \ '(-T)--notty[Do not allocate a tty.]' \ '(--user)-l[Log in using this user name.]:user:_users' \ '(-l)--user=[Log in using this user name.]:user:_users' \ '(--reconnect)-r[Reconnect to the server if the connection is lost.]' \ '(-r)--reconnect[Reconnect to the server if the connection is lost.]' \ "(--escape)-e[Set escape character; \`\`none'' = disable]:escape:_files" \ "(-e)--escape=[Set escape character; \`\`none'' = disable]:escape:_files" \ '(--remoteforward)-R[listen-port:host:port Forward remote port to local address]:listen-port:host:port:_files' \ '(-R)--remoteforward=[listen-port:host:port Forward remote port to local address]:listen-port:host:port:_files' \ '--logfile=[File to log to, or - for stdout]:logfile:_files' \ '(--port)-p[Connect to this port. Server must be on the same port.]:port:_files' \ '(-p)--port=[Connect to this port. Server must be on the same port.]:port:_files' \ '(--identity)-i[Identity for public-key authentication]:identity:_files' \ '(-i)--identity=[Identity for public-key authentication]:identity:_files' \ '--help[Display this help and exit.]' \ '(--null)-n[Redirect input from /dev/null.]' \ '(-n)--null[Redirect input from /dev/null.]' \ '(--log)-v[Enable logging (defaults to stderr)]' \ '(-v)--log[Enable logging (defaults to stderr)]' \ '(--nocache)-I[Do not allow connection sharing over this connection.]' \ '(-I)--nocache[Do not allow connection sharing over this connection.]' \ '(--nox11)-x[Disable X11 connection forwarding (default)]' \ '(-x)--nox11[Disable X11 connection forwarding (default)]' \ '(--version)-V[Display version number only.]' \ '(-V)--version[Display version number only.]' \ '(--noshell)-N[Do not execute a shell or command.]' \ '(-N)--noshell[Do not execute a shell or command.]' \ "(--connection-usage)-K[Connection types to use]:connection-usage:_values -s , 'connection types to choose from' unix direct" \ "(-K)--connection-usage=[Connection types to use]:connection-usage:_values -s , 'connection types to choose from' unix direct" \ '(--localforward)-L[listen-port:host:port Forward local port to remote address]:listen-port:host:port:_files' \ '(-L)--localforward=[listen-port:host:port Forward local port to remote address]:listen-port:host:port:_files' \ && return 0