#compdef ayllu-dispatch

autoload -U is-at-least

_ayllu-dispatch() {
    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+[Path to your configuration file]:FILE:_files' \
'--config=[Path to your configuration file]:FILE:_files' \
'-l+[Sets the logging level]:LEVEL:_default' \
'--level=[Sets the logging level]:LEVEL:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
}

(( $+functions[_ayllu-dispatch_commands] )) ||
_ayllu-dispatch_commands() {
    local commands; commands=()
    _describe -t commands 'ayllu-dispatch commands' commands "$@"
}

if [ "$funcstack[1]" = "_ayllu-dispatch" ]; then
    _ayllu-dispatch "$@"
else
    compdef _ayllu-dispatch ayllu-dispatch
fi
