#compdef ayllu-keys

autoload -U is-at-least

_ayllu-keys() {
    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+[Path to the Ayllu configuration file]:FILE:_files' \
'--config=[Path to the Ayllu configuration file]:FILE:_files' \
'--ayllu-shell=[Path to the ayllu-shell binary]:ayllu-shell:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
':username -- The username the caller is attempting to impersonate:_default' \
':home_dir -- The home directory of the caller specified user:_files' \
':ca_key_type -- Type of SSH key:_default' \
':certificate -- Public key body content:_default' \
&& ret=0
}

(( $+functions[_ayllu-keys_commands] )) ||
_ayllu-keys_commands() {
    local commands; commands=()
    _describe -t commands 'ayllu-keys commands' commands "$@"
}

if [ "$funcstack[1]" = "_ayllu-keys" ]; then
    _ayllu-keys "$@"
else
    compdef _ayllu-keys ayllu-keys
fi
