#compdef uu-shred

autoload -U is-at-least

_uu-shred() {
    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[@]}" : \
'-n+[shred-iterations-help]:NUMBER:_default' \
'--iterations=[shred-iterations-help]:NUMBER:_default' \
'-s+[shred-size-help]:N:_default' \
'--size=[shred-size-help]:N:_default' \
'--remove=[shred-remove-help]' \
'--random-source=[shred-random-source-help]: :_files' \
'-f[shred-force-help]' \
'--force[shred-force-help]' \
'-u[shred-deallocate-help]' \
'-v[shred-verbose-help]' \
'--verbose[shred-verbose-help]' \
'-x[shred-exact-help]' \
'--exact[shred-exact-help]' \
'-z[shred-zero-help]' \
'--zero[shred-zero-help]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::file:_files' \
&& ret=0
}

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

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