#compdef torsocks

_torsocks() {
  _arguments -C \
    '*:file:_files' \
    {-h,--help}'[Show summary of possible options and commands]' \
    '--shell[Create a new shell with LD_PRELOAD including torsocks(8)]' \
    '--version[Show version]' \
    {-u,--user}'[Set username for the SOCKS5 authentication. Use for circuit isolation in Tor]' \
    {-p,--pass}'[Set password for the SOCKS5 authentication. Use for circuit isolation in Tor]' \
    {-a,--address}'[Set Tor address. Accepts only numeric addresses]' \
    {-P,--port}'[Set Tor port]' \
    {-i,--isolate}'[Automatic tor isolation]' \
    {-6,--ipv6}'[Enable creation of ipv6 sockets]' \
    {-d,--debug}'[Activate the debug mode. Output will be written on stderr]' \
    {-q,--quiet}'[Suppress every log messages (even errors)]'
}

_torsocks
