_tracexec_core() {
    local i cur prev opts cmd
    COMPREPLY=()
    if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
        cur="$2"
    else
        cur="${COMP_WORDS[COMP_CWORD]}"
    fi
    prev="$3"
    cmd=""
    opts=""

    for i in "${COMP_WORDS[@]:0:COMP_CWORD}"
    do
        case "${cmd},${i}" in
            ",$1")
                cmd="tracexec_core"
                ;;
            tracexec_core,collect)
                cmd="tracexec_core__collect"
                ;;
            tracexec_core,ebpf)
                cmd="tracexec_core__ebpf"
                ;;
            tracexec_core,generate-completions)
                cmd="tracexec_core__generate__completions"
                ;;
            tracexec_core,help)
                cmd="tracexec_core__help"
                ;;
            tracexec_core,log)
                cmd="tracexec_core__log"
                ;;
            tracexec_core,tui)
                cmd="tracexec_core__tui"
                ;;
            tracexec_core__ebpf,collect)
                cmd="tracexec_core__ebpf__collect"
                ;;
            tracexec_core__ebpf,help)
                cmd="tracexec_core__ebpf__help"
                ;;
            tracexec_core__ebpf,log)
                cmd="tracexec_core__ebpf__log"
                ;;
            tracexec_core__ebpf,tui)
                cmd="tracexec_core__ebpf__tui"
                ;;
            tracexec_core__ebpf__help,collect)
                cmd="tracexec_core__ebpf__help__collect"
                ;;
            tracexec_core__ebpf__help,help)
                cmd="tracexec_core__ebpf__help__help"
                ;;
            tracexec_core__ebpf__help,log)
                cmd="tracexec_core__ebpf__help__log"
                ;;
            tracexec_core__ebpf__help,tui)
                cmd="tracexec_core__ebpf__help__tui"
                ;;
            tracexec_core__help,collect)
                cmd="tracexec_core__help__collect"
                ;;
            tracexec_core__help,ebpf)
                cmd="tracexec_core__help__ebpf"
                ;;
            tracexec_core__help,generate-completions)
                cmd="tracexec_core__help__generate__completions"
                ;;
            tracexec_core__help,help)
                cmd="tracexec_core__help__help"
                ;;
            tracexec_core__help,log)
                cmd="tracexec_core__help__log"
                ;;
            tracexec_core__help,tui)
                cmd="tracexec_core__help__tui"
                ;;
            tracexec_core__help__ebpf,collect)
                cmd="tracexec_core__help__ebpf__collect"
                ;;
            tracexec_core__help__ebpf,log)
                cmd="tracexec_core__help__ebpf__log"
                ;;
            tracexec_core__help__ebpf,tui)
                cmd="tracexec_core__help__ebpf__tui"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        tracexec_core)
            opts="-C -P -u -h -V --color --cwd --profile --no-profile --user --help --version log tui generate-completions collect ebpf help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --color)
                    COMPREPLY=($(compgen -W "auto always never" -- "${cur}"))
                    return 0
                    ;;
                --cwd)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -C)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --profile)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -P)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --user)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -u)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__collect)
            opts="-p -F -o -h --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --seccomp-bpf --polling-interval --pretty --format --output --foreground --no-foreground --help <CMD>..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --seccomp-bpf)
                    COMPREPLY=($(compgen -W "auto on off" -- "${cur}"))
                    return 0
                    ;;
                --polling-interval)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --format)
                    COMPREPLY=($(compgen -W "json-stream json perfetto" -- "${cur}"))
                    return 0
                    ;;
                -F)
                    COMPREPLY=($(compgen -W "json-stream json perfetto" -- "${cur}"))
                    return 0
                    ;;
                --output)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf)
            opts="-h --help log tui collect help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__collect)
            opts="-F -p -o -h --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --format --pretty --output --foreground --no-foreground --help [CMD]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --format)
                    COMPREPLY=($(compgen -W "json-stream json perfetto" -- "${cur}"))
                    return 0
                    ;;
                -F)
                    COMPREPLY=($(compgen -W "json-stream json perfetto" -- "${cur}"))
                    return 0
                    ;;
                --output)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__help)
            opts="log tui collect help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__help__collect)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__help__help)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__help__log)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__help__tui)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__log)
            opts="-o -h --output --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --more-colors --less-colors --show-cmdline --no-show-cmdline --show-interpreter --no-show-interpreter --foreground --no-foreground --diff-fd --no-diff-fd --show-fd --no-show-fd --diff-env --no-diff-env --show-env --no-show-env --show-comm --no-show-comm --show-argv --no-show-argv --show-filename --no-show-filename --show-cwd --no-show-cwd --decode-errno --no-decode-errno --help [CMD]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --output)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__ebpf__tui)
            opts="-t -f -A -L -F -m -h --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --show-all-events --filter --filter-include --filter-exclude --tty --follow --terminate-on-exit --kill-on-exit --active-pane --layout --frame-rate --max-events --help [CMD]..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-include)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-exclude)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --active-pane)
                    COMPREPLY=($(compgen -W "terminal events" -- "${cur}"))
                    return 0
                    ;;
                -A)
                    COMPREPLY=($(compgen -W "terminal events" -- "${cur}"))
                    return 0
                    ;;
                --layout)
                    COMPREPLY=($(compgen -W "horizontal vertical" -- "${cur}"))
                    return 0
                    ;;
                -L)
                    COMPREPLY=($(compgen -W "horizontal vertical" -- "${cur}"))
                    return 0
                    ;;
                --frame-rate)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -F)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-events)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -m)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__generate__completions)
            opts="-h --help bash elvish fish powershell zsh"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help)
            opts="log tui generate-completions collect ebpf help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__collect)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__ebpf)
            opts="log tui collect"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__ebpf__collect)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__ebpf__log)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__ebpf__tui)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__generate__completions)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__help)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__log)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__help__tui)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__log)
            opts="-o -h --more-colors --less-colors --show-cmdline --no-show-cmdline --show-interpreter --no-show-interpreter --foreground --no-foreground --diff-fd --no-diff-fd --show-fd --no-show-fd --diff-env --no-diff-env --show-env --no-show-env --show-comm --no-show-comm --show-argv --no-show-argv --show-filename --no-show-filename --show-cwd --no-show-cwd --decode-errno --no-decode-errno --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --seccomp-bpf --polling-interval --show-all-events --filter --filter-include --filter-exclude --output --help <CMD>..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --seccomp-bpf)
                    COMPREPLY=($(compgen -W "auto on off" -- "${cur}"))
                    return 0
                    ;;
                --polling-interval)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-include)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-exclude)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --output)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -o)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        tracexec_core__tui)
            opts="-t -f -A -L -F -m -D -b -h --successful-only --fd-in-cmdline --stdio-in-cmdline --resolve-proc-self-exe --no-resolve-proc-self-exe --hide-cloexec-fds --no-hide-cloexec-fds --timestamp --no-timestamp --inline-timestamp-format --seccomp-bpf --polling-interval --show-all-events --filter --filter-include --filter-exclude --tty --follow --terminate-on-exit --kill-on-exit --active-pane --layout --frame-rate --max-events --default-external-command --add-breakpoint --help <CMD>..."
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --inline-timestamp-format)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --seccomp-bpf)
                    COMPREPLY=($(compgen -W "auto on off" -- "${cur}"))
                    return 0
                    ;;
                --polling-interval)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-include)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --filter-exclude)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --active-pane)
                    COMPREPLY=($(compgen -W "terminal events" -- "${cur}"))
                    return 0
                    ;;
                -A)
                    COMPREPLY=($(compgen -W "terminal events" -- "${cur}"))
                    return 0
                    ;;
                --layout)
                    COMPREPLY=($(compgen -W "horizontal vertical" -- "${cur}"))
                    return 0
                    ;;
                -L)
                    COMPREPLY=($(compgen -W "horizontal vertical" -- "${cur}"))
                    return 0
                    ;;
                --frame-rate)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -F)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --max-events)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -m)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --default-external-command)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -D)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --add-breakpoint)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                -b)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
    esac
}

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
    complete -F _tracexec_core -o nosort -o bashdefault -o default tracexec_core
else
    complete -F _tracexec_core -o bashdefault -o default tracexec_core
fi
