#compdef envoy envoyd envoy-exec

zstyle -a ":completion:${curcontext}:" environ environ

case "$service" in
envoy)
  _arguments -s \
    {-h,--help}'[display this help]'\
    {-v,--version}'[display version]'\
    {-a,--add}'[add private key identities]':files:_files \
    {-k,--clear}'[force identities to expire (gpg-agent only)]'\
    {-K,--kill}'[kill the running agent]'\
    {-l,--list}'[list fingerprints of all loaded identities]'\
    {-u,--unlock=-}'[unlock the agent''s keyring (gpg-agent only)]'\
    {-p,--print}'[print out environmental arguments]' \
    {-s,--sh}'[print sh style commands]' \
    {-c,--csh}'[print csh style commands]' \
    {-f,--fish}'[print fish style commands]' \
    {-t,--agent=-}'[set the preferred agent to start]:agents:(ssh-agent gpg-agent)'
  ;;
envoyd)
  _arguments -s \
    {-h,--help}'[display this help]'\
    {-v,--version}'[display version]'\
    {-t,--agent=-}'[set the preferred agent to start]:agents:(ssh-agent gpg-agent)'
  ;;
envoy-exec)
  _arguments -s '*::arguments: _normal'
  ;;
esac
