#compdef uu-unexpand

autoload -U is-at-least

_uu-unexpand() {
    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[@]}" : \
'*-t+[unexpand-help-tabs]:N, LIST:_default' \
'*--tabs=[unexpand-help-tabs]:N, LIST:_default' \
'-a[unexpand-help-all]' \
'--all[unexpand-help-all]' \
'-f[unexpand-help-first-only]' \
'--first-only[unexpand-help-first-only]' \
'-U[unexpand-help-no-utf8]' \
'--no-utf8[unexpand-help-no-utf8]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::file:_files' \
&& ret=0
}

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

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