#compdef arch-audit

autoload -U is-at-least

_arch-audit() {
    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+[Bypass tty detection for colors]: :(auto always never)' \
'--color=[Bypass tty detection for colors]: :(auto always never)' \
'-b+[Set an alternate database location]' \
'--dbpath=[Set an alternate database location]' \
'-f+[Specify a format to control the output. Placeholders are %n (pkgname), %c (CVEs), %v (fixed version), %t (type), %s (severity), and %r (required by, only when -r is also used)]' \
'--format=[Specify a format to control the output. Placeholders are %n (pkgname), %c (CVEs), %v (fixed version), %t (type), %s (severity), and %r (required by, only when -r is also used)]' \
'--source=[Specify the URL or file path to the security tracker json data]' \
'--proxy=[Send requests through a proxy]' \
'*--sort=[Specify how to sort the output]: :(severity pkgname upgradable reverse)' \
'*-q[Show only vulnerable package names and their versions. Set twice to hide the versions as well]' \
'*--quiet[Show only vulnerable package names and their versions. Set twice to hide the versions as well]' \
'*-r[Prints packages that depend on vulnerable packages and are thus potentially vulnerable as well. Set twice to show ALL the packages that requires them]' \
'*--recursive[Prints packages that depend on vulnerable packages and are thus potentially vulnerable as well. Set twice to show ALL the packages that requires them]' \
'-t[Show packages which are in the \[testing\] repos. See https://wiki.archlinux.org/index.php/Official_repositories#Testing_repositories]' \
'--show-testing[Show packages which are in the \[testing\] repos. See https://wiki.archlinux.org/index.php/Official_repositories#Testing_repositories]' \
'-u[Show only packages that have already been fixed]' \
'--upgradable[Show only packages that have already been fixed]' \
'--json[Print json output]' \
'--no-proxy[Do not use a proxy even if one is configured]' \
'-c[Print the CVE numbers]' \
'--show-cve[Print the CVE numbers]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_arch-audit_commands" \
"*::: :->arch-audit" \
&& ret=0
    case $state in
    (arch-audit)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:arch-audit-command-$line[1]:"
        case $line[1] in
            (completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':shell:(zsh bash fish powershell elvish)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_arch-audit_commands] )) ||
_arch-audit_commands() {
    local commands; commands=(
        "completions:Generate shell completions" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'arch-audit commands' commands "$@"
}
(( $+functions[_arch-audit__completions_commands] )) ||
_arch-audit__completions_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'arch-audit completions commands' commands "$@"
}
(( $+functions[_arch-audit__help_commands] )) ||
_arch-audit__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'arch-audit help commands' commands "$@"
}

_arch-audit "$@"