#compdef uu-shuf

autoload -U is-at-least

_uu-shuf() {
    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[@]}" \
'(-i --input-range)-e+[treat each ARG as an input line]' \
'(-i --input-range)--echo=[treat each ARG as an input line]' \
'()-i+[treat each number LO through HI as an input line]:LO-HI: ' \
'()--input-range=[treat each number LO through HI as an input line]:LO-HI: ' \
'-n+[output at most COUNT lines]:COUNT: ' \
'--head-count=[output at most COUNT lines]:COUNT: ' \
'-o+[write result to FILE instead of standard output]:FILE:_files' \
'--output=[write result to FILE instead of standard output]:FILE:_files' \
'--random-source=[get random bytes from FILE]:FILE:_files' \
'-r[output lines can be repeated]' \
'--repeat[output lines can be repeated]' \
'-z[line delimiter is NUL, not newline]' \
'--zero-terminated[line delimiter is NUL, not newline]' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'::file:_files' \
&& ret=0
}

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

_uu-shuf "$@"
