#compdef uu-stat

autoload -U is-at-least

_uu-stat() {
    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+[stat-help-format]:FORMAT:_default' \
'--format=[stat-help-format]:FORMAT:_default' \
'--printf=[stat-help-printf]:FORMAT:_default' \
'-L[stat-help-dereference]' \
'--dereference[stat-help-dereference]' \
'-f[stat-help-file-system]' \
'--file-system[stat-help-file-system]' \
'-t[stat-help-terse]' \
'--terse[stat-help-terse]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::files:_files' \
&& ret=0
}

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

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