#compdef precachedtop

autoload -U is-at-least

_precachedtop() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'-c+[The precached config file to use]' \
'--config=[The precached config file to use]' \
'*-v[Sets the level of output verbosity]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_precachedtop_commands" \
"*::: :->precachedtop" \
&& ret=0
    case $state in
    (precachedtop)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:precachedtop-command-$line[1]:"
        case $line[1] in
            (help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':SHELL -- The shell to generate the script for:(bash fish zsh powershell)' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_precachedtop_commands] )) ||
_precachedtop_commands() {
    local commands; commands=(
        "help:Display this short help text" \
"completions:Generates completion scripts for your shell" \
    )
    _describe -t commands 'precachedtop commands' commands "$@"
}
(( $+functions[_precachedtop__completions_commands] )) ||
_precachedtop__completions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'precachedtop completions commands' commands "$@"
}
(( $+functions[_precachedtop__help_commands] )) ||
_precachedtop__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'precachedtop help commands' commands "$@"
}

_precachedtop "$@"