#compdef uu-rm

autoload -U is-at-least

_uu-rm() {
    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[@]}" : \
'--interactive=[rm-help-interactive]' \
'-f[rm-help-force]' \
'--force[rm-help-force]' \
'-i[rm-help-prompt-always]' \
'-I[rm-help-prompt-once]' \
'--one-file-system[rm-help-one-file-system]' \
'--no-preserve-root[rm-help-no-preserve-root]' \
'--preserve-root[rm-help-preserve-root]' \
'-r[rm-help-recursive]' \
'-R[rm-help-recursive]' \
'--recursive[rm-help-recursive]' \
'-d[rm-help-dir]' \
'--dir[rm-help-dir]' \
'-v[rm-help-verbose]' \
'--verbose[rm-help-verbose]' \
'--presume-input-tty[]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'*::files:_files' \
&& ret=0
}

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

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