Tinkering with REPL settings in `~/.julia/config/startup.jl`

I’m using Julia 1.9.2.
In the “state of Julia” talk at JuliaCon, a function was mentioned that I wanted to add to my startup: REPL.numbered_prompt!() … but if I add this to my startup:

using REPL
REPL.numbered_prompt!()

I get this error:
ERROR: LoadError: UndefVarError: active_repl not defined

Is there any way to cause that code to be triggered at startup?

Try this:

atreplinit() do repl
    if isinteractive()
        @eval begin
            import REPL
            REPL.numbered_prompt!(repl)
        end
    end
end

I get:

UndefVarError: `repl` not defined

Ah. Here is the solution from the REPL documentation

atreplinit() do repl
    @eval import REPL
    if !isdefined(repl, :interface)
        repl.interface = REPL.setup_interface(repl)
    end
    REPL.numbered_prompt!(repl)
end