#compdef proxychains4

setopt localoptions extended_glob

local -a _comp_priv_prefix

_arguments \
  '(- *)--help[More help in README file]' \
  '(-q)-q[makes proxychains quiet - this overrides the config setting]' \
  '(-f)-f[allows one to manually specify a configfile to use]:filename:_files' \
  '(-)1:command: _command_names -e' \
  '*::arguments:{ _comp_priv_prefix=( '$words[1]' -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) ; _normal }'
