#compdef fedora-update-feedback

autoload -U is-at-least

_fedora-update-feedback() {
    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[@]}" \
'-u+[Override or provide FAS username]:USERNAME: ' \
'--username=[Override or provide FAS username]:USERNAME: ' \
'-a+[Add a package name to the list of ignored packages]:ADD_IGNORED_PACKAGE: ' \
'--add-ignored-package=[Add a package name to the list of ignored packages]:ADD_IGNORED_PACKAGE: ' \
'-r+[Remove a package name from the list of ignored packages]:REMOVE_IGNORED_PACKAGE: ' \
'--remove-ignored-package=[Remove a package name from the list of ignored packages]:REMOVE_IGNORED_PACKAGE: ' \
'-O[Check for installed obsolete updates]' \
'--check-obsoleted[Check for installed obsolete updates]' \
'-P[Include updates in "pending" state]' \
'--check-pending[Include updates in "pending" state]' \
'-c[Include updates that were already commented on]' \
'--check-commented[Include updates that were already commented on]' \
'-I[Include updates that were previously ignored]' \
'--check-ignored[Include updates that were previously ignored]' \
'-U[Check for installed unpushed updates]' \
'--check-unpushed[Check for installed unpushed updates]' \
'-i[Clear ignored updates]' \
'--clear-ignored[Clear ignored updates]' \
'--ignore-keyring[Ignore password stored in session keyring]' \
'-p[Print the list of ignored packages and updates]' \
'--print-ignored[Print the list of ignored packages and updates]' \
'-v[Print more progress information and command output]' \
'--verbose[Print more progress information and command output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
}

(( $+functions[_fedora-update-feedback_commands] )) ||
_fedora-update-feedback_commands() {
    local commands; commands=()
    _describe -t commands 'fedora-update-feedback commands' commands "$@"
}

if [ "$funcstack[1]" = "_fedora-update-feedback" ]; then
    _fedora-update-feedback "$@"
else
    compdef _fedora-update-feedback fedora-update-feedback
fi
