#compdef arch-repro-status

autoload -U is-at-least

_arch-repro-status() {
    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[@]}" \
'-m+[Sets the username of the maintainer]:MAINTAINER: ' \
'--maintainer=[Sets the username of the maintainer]:MAINTAINER: ' \
'-r+[Sets the address of the rebuilderd instance]:URL: ' \
'--rebuilderd=[Sets the address of the rebuilderd instance]:URL: ' \
'-b+[Sets the path to the pacman database]:PATH: ' \
'--dbpath=[Sets the path to the pacman database]:PATH: ' \
'*--repos=[Sets the repositories to query]:REPO: ' \
'*-n+[Sets the specific packages to query for]:PKGNAME: ' \
'*--pkgnames=[Sets the specific packages to query for]:PKGNAME: ' \
'-f+[Sets the filter for package status]:STATUS:(GOOD BAD UNKWN)' \
'--filter=[Sets the filter for package status]:STATUS:(GOOD BAD UNKWN)' \
'-p+[Sets the pager for viewing files]:PAGER: ' \
'--pager=[Sets the pager for viewing files]:PAGER: ' \
'-c+[Sets the cache directory for log files]:DIR:_files' \
'--cache-dir=[Sets the cache directory for log files]:DIR:_files' \
'-q[Disables logging]' \
'--quiet[Disables logging]' \
'*-v[Increases the logging verbosity]' \
'*--verbose[Increases the logging verbosity]' \
'-a[Checks all of the packages on the system]' \
'--all[Checks all of the packages on the system]' \
'-i[Views the build log or diffoscope of the interactively selected package]' \
'--inspect[Views the build log or diffoscope of the interactively selected package]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
}

(( $+functions[_arch-repro-status_commands] )) ||
_arch-repro-status_commands() {
    local commands; commands=()
    _describe -t commands 'arch-repro-status commands' commands "$@"
}

if [ "$funcstack[1]" = "_arch-repro-status" ]; then
    _arch-repro-status "$@"
else
    compdef _arch-repro-status arch-repro-status
fi
