#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=[prompt according to WHEN: never, once (-I), or always (-i). Without WHEN, prompts always]:WHEN: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'*-f[ignore nonexistent files and arguments, never prompt]' \
'*--force[ignore nonexistent files and arguments, never prompt]' \
'-i[]' \
'--prompt before every removal[]' \
'-I[prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving some protection against most mistakes]' \
'--one-file-system[when removing a hierarchy recursively, skip any directory that is on a file system different from that of the corresponding command line argument (NOT IMPLEMENTED)]' \
'--no-preserve-root[do not treat '\''/'\'' specially]' \
'--preserve-root[do not remove '\''/'\'' (default)]' \
'*-r[remove directories and their contents recursively]' \
'*--recursive[remove directories and their contents recursively]' \
'-R[Equivalent to -r]' \
'-d[remove empty directories]' \
'--dir[remove empty directories]' \
'-v[explain what is being done]' \
'--verbose[explain what is being done]' \
'--presume-input-tty[]' \
'*::files:_files' \
&& ret=0
}

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

_uu-rm "$@"
