#compdef uu-b2sum

autoload -U is-at-least

_uu-b2sum() {
    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[@]}" : \
'-l+[ck-common-help-length]: :_default' \
'--length=[ck-common-help-length]: :_default' \
'-b[]' \
'--binary[]' \
'-c[ck-common-help-check]' \
'--check[ck-common-help-check]' \
'-w[ck-common-help-warn]' \
'--warn[ck-common-help-warn]' \
'--status[ck-common-help-status]' \
'--quiet[ck-common-help-quiet]' \
'--ignore-missing[ck-common-help-ignore-missing]' \
'--strict[ck-common-help-strict]' \
'--tag[ck-common-help-tag]' \
'-t[ck-common-help-text]' \
'--text[ck-common-help-text]' \
'-z[ck-common-help-zero]' \
'--zero[ck-common-help-zero]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::file:_files' \
&& ret=0
}

(( $+functions[_uu-b2sum_commands] )) ||
_uu-b2sum_commands() {
    local commands; commands=()
    _describe -t commands 'uu-b2sum commands' commands "$@"
}

if [ "$funcstack[1]" = "_uu-b2sum" ]; then
    _uu-b2sum "$@"
else
    compdef _uu-b2sum uu-b2sum
fi
