#compdef uu-split

autoload -U is-at-least

_uu-split() {
    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[@]}" \
'-b+[put SIZE bytes per output file]:SIZE: ' \
'--bytes=[put SIZE bytes per output file]:SIZE: ' \
'-C+[put at most SIZE bytes of lines per output file]:SIZE: ' \
'--line-bytes=[put at most SIZE bytes of lines per output file]:SIZE: ' \
'-l+[put NUMBER lines/records per output file]:NUMBER: ' \
'--lines=[put NUMBER lines/records per output file]:NUMBER: ' \
'-n+[generate CHUNKS output files; see explanation below]:CHUNKS: ' \
'--number=[generate CHUNKS output files; see explanation below]:CHUNKS: ' \
'--additional-suffix=[additional SUFFIX to append to output file names]:SUFFIX: ' \
'--filter=[write to shell COMMAND; file name is $FILE (Currently not implemented for Windows)]:COMMAND:_command_names -e' \
'-d+[use numeric suffixes instead of alphabetic]' \
'--numeric-suffixes=[use numeric suffixes instead of alphabetic]' \
'-a+[use suffixes of fixed length N. 0 implies dynamic length.]:N: ' \
'--suffix-length=[use suffixes of fixed length N. 0 implies dynamic length.]:N: ' \
'-x+[use hex suffixes instead of alphabetic]' \
'--hex-suffixes=[use hex suffixes instead of alphabetic]' \
'--io=[]: : ' \
'--io-blksize=[]: : ' \
'-e[do not generate empty output files with '\''-n'\'']' \
'--elide-empty-files[do not generate empty output files with '\''-n'\'']' \
'--verbose[print a diagnostic just before each output file is opened]' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'::input:_files' \
'::prefix:' \
&& ret=0
}

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

_uu-split "$@"
