#compdef uu-head

autoload -U is-at-least

_uu-head() {
    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[@]}" \
'-c+[print the first NUM bytes of each file;
with the leading '\''-'\'', print all but the last
NUM bytes of each file]:[-]NUM: ' \
'--bytes=[print the first NUM bytes of each file;
with the leading '\''-'\'', print all but the last
NUM bytes of each file]:[-]NUM: ' \
'-n+[print the first NUM lines instead of the first 10;
with the leading '\''-'\'', print all but the last
NUM lines of each file]:[-]NUM: ' \
'--lines=[print the first NUM lines instead of the first 10;
with the leading '\''-'\'', print all but the last
NUM lines of each file]:[-]NUM: ' \
'-q[never print headers giving file names]' \
'--quiet[never print headers giving file names]' \
'--silent[never print headers giving file names]' \
'-v[always print headers giving file names]' \
'--verbose[always print headers giving file names]' \
'--presume-input-pipe[]' \
'-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-head_commands] )) ||
_uu-head_commands() {
    local commands; commands=()
    _describe -t commands 'uu-head commands' commands "$@"
}

_uu-head "$@"
