#compdef uu-nice

autoload -U is-at-least

_uu-nice() {
    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+[add N to the niceness (default is 10)]: : ' \
'--adjustment=[add N to the niceness (default is 10)]: : ' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::COMMAND:_command_names -e' \
&& ret=0
}

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

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