#compdef pyenv
_arguments \
    ': :compadd $(pyenv commands)' \
    "*: :compadd -- $(pyenv completions $words[2,-2] 2>/dev/null)"
