#compdef ayllu-migrate

autoload -U is-at-least

_ayllu-migrate() {
    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' \
'-m+[Optional path to migration files]:FILE:_files' \
'--migrations=[Optional path to migration files]:FILE:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
}

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

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