#compdef agama

autoload -U is-at-least

_agama() {
    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[@]}" : \
'--host=[URI pointing to Agama'\''s remote host]:HOST:_default' \
'--insecure[Whether to accept invalid (self-signed, ...) certificates or not]' \
'--local[Some commands could be able to work even without connection to the agama server]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_agama_commands" \
"*::: :->agama" \
&& ret=0
    case $state in
    (agama)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-command-$line[1]:"
        case $line[1] in
            (config)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_agama__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-config-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
'-o+[Save the output here (goes to stdout if not given)]:FILE_PATH:_default' \
'--output=[Save the output here (goes to stdout if not given)]:FILE_PATH:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(load)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'::url_or_path -- JSON file\: URL or path or `-` for standard input:_default' \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
'--local[Run subcommands (if possible) in local mode - without trying to connect to remote agama server]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':url_or_path -- JSON file, URL or path or `-` for standard input:_default' \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::url_or_path -- JSON file\: URL or path or `-` for standard input:_default' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'-e+[Editor command (including additional arguments if needed)]:EDITOR:_default' \
'--editor=[Editor command (including additional arguments if needed)]:EDITOR:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_agama__config__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-config-help-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(load)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(probe)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(questions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_agama__questions_commands" \
"*::: :->questions" \
&& ret=0

    case $state in
    (questions)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-questions-command-$line[1]:"
        case $line[1] in
            (mode)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':value:((interactive\:"Ask the user and block the installation"
non-interactive\:"Do not block the installation"))' \
&& ret=0
;;
(answers)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':path -- Path to a file containing the answers in JSON format:_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(ask)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_agama__questions__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-questions-help-command-$line[1]:"
        case $line[1] in
            (mode)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(answers)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ask)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(logs)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_agama__logs_commands" \
"*::: :->logs" \
&& ret=0

    case $state in
    (logs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-logs-command-$line[1]:"
        case $line[1] in
            (store)
_arguments "${_arguments_options[@]}" : \
'-d+[Path to destination directory and, optionally, the archive file name. The extension will be added automatically]:DESTINATION:_files' \
'--destination=[Path to destination directory and, optionally, the archive file name. The extension will be added automatically]:DESTINATION:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_agama__logs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-logs-help-command-$line[1]:"
        case $line[1] in
            (store)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(auth)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_agama__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-auth-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_agama__auth__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-auth-help-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(download)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':url -- URL reference pointing to file for download. If a relative URL is provided, it will be resolved against the current working directory:_default' \
':destination -- File name:_files' \
&& ret=0
;;
(finish)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::method -- What to do after finishing the installation. Possible values\::_default' \
&& ret=0
;;
(monitor)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(events)
_arguments "${_arguments_options[@]}" : \
'-p[Display the events in a more human-readable way]' \
'--pretty[Display the events in a more human-readable way]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_agama__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-help-command-$line[1]:"
        case $line[1] in
            (config)
_arguments "${_arguments_options[@]}" : \
":: :_agama__help__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-help-config-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(load)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(probe)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(questions)
_arguments "${_arguments_options[@]}" : \
":: :_agama__help__questions_commands" \
"*::: :->questions" \
&& ret=0

    case $state in
    (questions)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-help-questions-command-$line[1]:"
        case $line[1] in
            (mode)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(answers)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ask)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(logs)
_arguments "${_arguments_options[@]}" : \
":: :_agama__help__logs_commands" \
"*::: :->logs" \
&& ret=0

    case $state in
    (logs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-help-logs-command-$line[1]:"
        case $line[1] in
            (store)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(auth)
_arguments "${_arguments_options[@]}" : \
":: :_agama__help__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:agama-help-auth-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(download)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(finish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(monitor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_agama_commands] )) ||
_agama_commands() {
    local commands; commands=(
'config:Inspect or change the installation settings' \
'probe:Analyze the system' \
'install:Start the system installation' \
'questions:Handle installer questions' \
'logs:Collect the installer logs' \
'auth:Authenticate with Agama'\''s server' \
'download:Download file from a given (AutoYaST) URL' \
'finish:Finish the installation' \
'monitor:Monitors the Agama service' \
'events:Display Agama events' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama commands' commands "$@"
}
(( $+functions[_agama__auth_commands] )) ||
_agama__auth_commands() {
    local commands; commands=(
'login:Authenticate with Agama'\''s server and store the token' \
'logout:Deauthenticate by removing the token' \
'show:Print the used token to the standard output' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama auth commands' commands "$@"
}
(( $+functions[_agama__auth__help_commands] )) ||
_agama__auth__help_commands() {
    local commands; commands=(
'login:Authenticate with Agama'\''s server and store the token' \
'logout:Deauthenticate by removing the token' \
'show:Print the used token to the standard output' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama auth help commands' commands "$@"
}
(( $+functions[_agama__auth__help__help_commands] )) ||
_agama__auth__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth help help commands' commands "$@"
}
(( $+functions[_agama__auth__help__login_commands] )) ||
_agama__auth__help__login_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth help login commands' commands "$@"
}
(( $+functions[_agama__auth__help__logout_commands] )) ||
_agama__auth__help__logout_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth help logout commands' commands "$@"
}
(( $+functions[_agama__auth__help__show_commands] )) ||
_agama__auth__help__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth help show commands' commands "$@"
}
(( $+functions[_agama__auth__login_commands] )) ||
_agama__auth__login_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth login commands' commands "$@"
}
(( $+functions[_agama__auth__logout_commands] )) ||
_agama__auth__logout_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth logout commands' commands "$@"
}
(( $+functions[_agama__auth__show_commands] )) ||
_agama__auth__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama auth show commands' commands "$@"
}
(( $+functions[_agama__config_commands] )) ||
_agama__config_commands() {
    local commands; commands=(
'show:Generate an installation profile with the current settings' \
'load:Read and load a profile' \
'validate:Validate a profile using JSON Schema' \
'generate:Generate and print a native Agama JSON configuration from any kind and location.' \
'edit:Edit and update installation option using an external editor' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama config commands' commands "$@"
}
(( $+functions[_agama__config__edit_commands] )) ||
_agama__config__edit_commands() {
    local commands; commands=()
    _describe -t commands 'agama config edit commands' commands "$@"
}
(( $+functions[_agama__config__generate_commands] )) ||
_agama__config__generate_commands() {
    local commands; commands=()
    _describe -t commands 'agama config generate commands' commands "$@"
}
(( $+functions[_agama__config__help_commands] )) ||
_agama__config__help_commands() {
    local commands; commands=(
'show:Generate an installation profile with the current settings' \
'load:Read and load a profile' \
'validate:Validate a profile using JSON Schema' \
'generate:Generate and print a native Agama JSON configuration from any kind and location.' \
'edit:Edit and update installation option using an external editor' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama config help commands' commands "$@"
}
(( $+functions[_agama__config__help__edit_commands] )) ||
_agama__config__help__edit_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help edit commands' commands "$@"
}
(( $+functions[_agama__config__help__generate_commands] )) ||
_agama__config__help__generate_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help generate commands' commands "$@"
}
(( $+functions[_agama__config__help__help_commands] )) ||
_agama__config__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help help commands' commands "$@"
}
(( $+functions[_agama__config__help__load_commands] )) ||
_agama__config__help__load_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help load commands' commands "$@"
}
(( $+functions[_agama__config__help__show_commands] )) ||
_agama__config__help__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help show commands' commands "$@"
}
(( $+functions[_agama__config__help__validate_commands] )) ||
_agama__config__help__validate_commands() {
    local commands; commands=()
    _describe -t commands 'agama config help validate commands' commands "$@"
}
(( $+functions[_agama__config__load_commands] )) ||
_agama__config__load_commands() {
    local commands; commands=()
    _describe -t commands 'agama config load commands' commands "$@"
}
(( $+functions[_agama__config__show_commands] )) ||
_agama__config__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama config show commands' commands "$@"
}
(( $+functions[_agama__config__validate_commands] )) ||
_agama__config__validate_commands() {
    local commands; commands=()
    _describe -t commands 'agama config validate commands' commands "$@"
}
(( $+functions[_agama__download_commands] )) ||
_agama__download_commands() {
    local commands; commands=()
    _describe -t commands 'agama download commands' commands "$@"
}
(( $+functions[_agama__events_commands] )) ||
_agama__events_commands() {
    local commands; commands=()
    _describe -t commands 'agama events commands' commands "$@"
}
(( $+functions[_agama__finish_commands] )) ||
_agama__finish_commands() {
    local commands; commands=()
    _describe -t commands 'agama finish commands' commands "$@"
}
(( $+functions[_agama__help_commands] )) ||
_agama__help_commands() {
    local commands; commands=(
'config:Inspect or change the installation settings' \
'probe:Analyze the system' \
'install:Start the system installation' \
'questions:Handle installer questions' \
'logs:Collect the installer logs' \
'auth:Authenticate with Agama'\''s server' \
'download:Download file from a given (AutoYaST) URL' \
'finish:Finish the installation' \
'monitor:Monitors the Agama service' \
'events:Display Agama events' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama help commands' commands "$@"
}
(( $+functions[_agama__help__auth_commands] )) ||
_agama__help__auth_commands() {
    local commands; commands=(
'login:Authenticate with Agama'\''s server and store the token' \
'logout:Deauthenticate by removing the token' \
'show:Print the used token to the standard output' \
    )
    _describe -t commands 'agama help auth commands' commands "$@"
}
(( $+functions[_agama__help__auth__login_commands] )) ||
_agama__help__auth__login_commands() {
    local commands; commands=()
    _describe -t commands 'agama help auth login commands' commands "$@"
}
(( $+functions[_agama__help__auth__logout_commands] )) ||
_agama__help__auth__logout_commands() {
    local commands; commands=()
    _describe -t commands 'agama help auth logout commands' commands "$@"
}
(( $+functions[_agama__help__auth__show_commands] )) ||
_agama__help__auth__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama help auth show commands' commands "$@"
}
(( $+functions[_agama__help__config_commands] )) ||
_agama__help__config_commands() {
    local commands; commands=(
'show:Generate an installation profile with the current settings' \
'load:Read and load a profile' \
'validate:Validate a profile using JSON Schema' \
'generate:Generate and print a native Agama JSON configuration from any kind and location.' \
'edit:Edit and update installation option using an external editor' \
    )
    _describe -t commands 'agama help config commands' commands "$@"
}
(( $+functions[_agama__help__config__edit_commands] )) ||
_agama__help__config__edit_commands() {
    local commands; commands=()
    _describe -t commands 'agama help config edit commands' commands "$@"
}
(( $+functions[_agama__help__config__generate_commands] )) ||
_agama__help__config__generate_commands() {
    local commands; commands=()
    _describe -t commands 'agama help config generate commands' commands "$@"
}
(( $+functions[_agama__help__config__load_commands] )) ||
_agama__help__config__load_commands() {
    local commands; commands=()
    _describe -t commands 'agama help config load commands' commands "$@"
}
(( $+functions[_agama__help__config__show_commands] )) ||
_agama__help__config__show_commands() {
    local commands; commands=()
    _describe -t commands 'agama help config show commands' commands "$@"
}
(( $+functions[_agama__help__config__validate_commands] )) ||
_agama__help__config__validate_commands() {
    local commands; commands=()
    _describe -t commands 'agama help config validate commands' commands "$@"
}
(( $+functions[_agama__help__download_commands] )) ||
_agama__help__download_commands() {
    local commands; commands=()
    _describe -t commands 'agama help download commands' commands "$@"
}
(( $+functions[_agama__help__events_commands] )) ||
_agama__help__events_commands() {
    local commands; commands=()
    _describe -t commands 'agama help events commands' commands "$@"
}
(( $+functions[_agama__help__finish_commands] )) ||
_agama__help__finish_commands() {
    local commands; commands=()
    _describe -t commands 'agama help finish commands' commands "$@"
}
(( $+functions[_agama__help__help_commands] )) ||
_agama__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'agama help help commands' commands "$@"
}
(( $+functions[_agama__help__install_commands] )) ||
_agama__help__install_commands() {
    local commands; commands=()
    _describe -t commands 'agama help install commands' commands "$@"
}
(( $+functions[_agama__help__logs_commands] )) ||
_agama__help__logs_commands() {
    local commands; commands=(
'store:Collect and store the logs in a tar archive' \
'list:List the logs to collect' \
    )
    _describe -t commands 'agama help logs commands' commands "$@"
}
(( $+functions[_agama__help__logs__list_commands] )) ||
_agama__help__logs__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama help logs list commands' commands "$@"
}
(( $+functions[_agama__help__logs__store_commands] )) ||
_agama__help__logs__store_commands() {
    local commands; commands=()
    _describe -t commands 'agama help logs store commands' commands "$@"
}
(( $+functions[_agama__help__monitor_commands] )) ||
_agama__help__monitor_commands() {
    local commands; commands=()
    _describe -t commands 'agama help monitor commands' commands "$@"
}
(( $+functions[_agama__help__probe_commands] )) ||
_agama__help__probe_commands() {
    local commands; commands=()
    _describe -t commands 'agama help probe commands' commands "$@"
}
(( $+functions[_agama__help__questions_commands] )) ||
_agama__help__questions_commands() {
    local commands; commands=(
'mode:Set the mode for answering questions' \
'answers:Load predefined answers' \
'list:Prints the list of questions that are waiting for an answer in JSON format' \
'ask:Reads a question definition in JSON from stdin and prints the response when it is answered' \
    )
    _describe -t commands 'agama help questions commands' commands "$@"
}
(( $+functions[_agama__help__questions__answers_commands] )) ||
_agama__help__questions__answers_commands() {
    local commands; commands=()
    _describe -t commands 'agama help questions answers commands' commands "$@"
}
(( $+functions[_agama__help__questions__ask_commands] )) ||
_agama__help__questions__ask_commands() {
    local commands; commands=()
    _describe -t commands 'agama help questions ask commands' commands "$@"
}
(( $+functions[_agama__help__questions__list_commands] )) ||
_agama__help__questions__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama help questions list commands' commands "$@"
}
(( $+functions[_agama__help__questions__mode_commands] )) ||
_agama__help__questions__mode_commands() {
    local commands; commands=()
    _describe -t commands 'agama help questions mode commands' commands "$@"
}
(( $+functions[_agama__install_commands] )) ||
_agama__install_commands() {
    local commands; commands=()
    _describe -t commands 'agama install commands' commands "$@"
}
(( $+functions[_agama__logs_commands] )) ||
_agama__logs_commands() {
    local commands; commands=(
'store:Collect and store the logs in a tar archive' \
'list:List the logs to collect' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama logs commands' commands "$@"
}
(( $+functions[_agama__logs__help_commands] )) ||
_agama__logs__help_commands() {
    local commands; commands=(
'store:Collect and store the logs in a tar archive' \
'list:List the logs to collect' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama logs help commands' commands "$@"
}
(( $+functions[_agama__logs__help__help_commands] )) ||
_agama__logs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'agama logs help help commands' commands "$@"
}
(( $+functions[_agama__logs__help__list_commands] )) ||
_agama__logs__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama logs help list commands' commands "$@"
}
(( $+functions[_agama__logs__help__store_commands] )) ||
_agama__logs__help__store_commands() {
    local commands; commands=()
    _describe -t commands 'agama logs help store commands' commands "$@"
}
(( $+functions[_agama__logs__list_commands] )) ||
_agama__logs__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama logs list commands' commands "$@"
}
(( $+functions[_agama__logs__store_commands] )) ||
_agama__logs__store_commands() {
    local commands; commands=()
    _describe -t commands 'agama logs store commands' commands "$@"
}
(( $+functions[_agama__monitor_commands] )) ||
_agama__monitor_commands() {
    local commands; commands=()
    _describe -t commands 'agama monitor commands' commands "$@"
}
(( $+functions[_agama__probe_commands] )) ||
_agama__probe_commands() {
    local commands; commands=()
    _describe -t commands 'agama probe commands' commands "$@"
}
(( $+functions[_agama__questions_commands] )) ||
_agama__questions_commands() {
    local commands; commands=(
'mode:Set the mode for answering questions' \
'answers:Load predefined answers' \
'list:Prints the list of questions that are waiting for an answer in JSON format' \
'ask:Reads a question definition in JSON from stdin and prints the response when it is answered' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama questions commands' commands "$@"
}
(( $+functions[_agama__questions__answers_commands] )) ||
_agama__questions__answers_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions answers commands' commands "$@"
}
(( $+functions[_agama__questions__ask_commands] )) ||
_agama__questions__ask_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions ask commands' commands "$@"
}
(( $+functions[_agama__questions__help_commands] )) ||
_agama__questions__help_commands() {
    local commands; commands=(
'mode:Set the mode for answering questions' \
'answers:Load predefined answers' \
'list:Prints the list of questions that are waiting for an answer in JSON format' \
'ask:Reads a question definition in JSON from stdin and prints the response when it is answered' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'agama questions help commands' commands "$@"
}
(( $+functions[_agama__questions__help__answers_commands] )) ||
_agama__questions__help__answers_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions help answers commands' commands "$@"
}
(( $+functions[_agama__questions__help__ask_commands] )) ||
_agama__questions__help__ask_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions help ask commands' commands "$@"
}
(( $+functions[_agama__questions__help__help_commands] )) ||
_agama__questions__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions help help commands' commands "$@"
}
(( $+functions[_agama__questions__help__list_commands] )) ||
_agama__questions__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions help list commands' commands "$@"
}
(( $+functions[_agama__questions__help__mode_commands] )) ||
_agama__questions__help__mode_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions help mode commands' commands "$@"
}
(( $+functions[_agama__questions__list_commands] )) ||
_agama__questions__list_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions list commands' commands "$@"
}
(( $+functions[_agama__questions__mode_commands] )) ||
_agama__questions__mode_commands() {
    local commands; commands=()
    _describe -t commands 'agama questions mode commands' commands "$@"
}

if [ "$funcstack[1]" = "_agama" ]; then
    _agama "$@"
else
    compdef _agama agama
fi
