#compdef rage-keygen

autoload -U is-at-least

_rage-keygen() {
    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[@]}" \
'-o+[Write the result to the file at path OUTPUT. Defaults to standard output.]:OUTPUT: ' \
'--output=[Write the result to the file at path OUTPUT. Defaults to standard output.]:OUTPUT: ' \
'-h[Print this help message and exit.]' \
'--help[Print this help message and exit.]' \
'-V[Print version info and exit.]' \
'--version[Print version info and exit.]' \
'-y[Convert an identity file to a recipients file.]' \
'::input -- Path to a file to read from.:' \
&& ret=0
}

(( $+functions[_rage-keygen_commands] )) ||
_rage-keygen_commands() {
    local commands; commands=()
    _describe -t commands 'rage-keygen commands' commands "$@"
}

if [ "$funcstack[1]" = "_rage-keygen" ]; then
    _rage-keygen "$@"
else
    compdef _rage-keygen rage-keygen
fi
