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

**URL:** https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329
**Category:** New to Julia
**Tags:** repl
**Created:** [July 31, 2023, 6:43pm UTC](https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329 "2023-07-31T18:43:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![frylock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frylock/32/50213_2.png) [@frylock](https://discourse.julialang.org/u/frylock)
#### Post date: [July 31, 2023, 6:43pm UTC](https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329/1 "2023-07-31T18:43:45Z")

</div>

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:

```julia
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?

---

<div class="post-metadata">

### Author: ![caleb-allen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/caleb-allen/32/14054_2.png) [@caleb-allen](https://discourse.julialang.org/u/caleb-allen)
#### Post date: [July 31, 2023, 7:06pm UTC](https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329/2 "2023-07-31T19:06:09Z")

</div>

Try this:

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

```

---

<div class="post-metadata">

### Author: ![frylock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frylock/32/50213_2.png) [@frylock](https://discourse.julialang.org/u/frylock)
#### Post date: [July 31, 2023, 7:15pm UTC](https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329/3 "2023-07-31T19:15:50Z")

</div>

I get:

```julia
UndefVarError: `repl` not defined

```

---

<div class="post-metadata">

### Author: ![caleb-allen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/caleb-allen/32/14054_2.png) [@caleb-allen](https://discourse.julialang.org/u/caleb-allen)
#### Post date: [July 31, 2023, 11:38pm UTC](https://discourse.julialang.org/t/tinkering-with-repl-settings-in-julia-config-startup-jl/102329/4 "2023-07-31T23:38:20Z")

</div>

Ah. Here is the solution from the [REPL documentation](https://docs.julialang.org/en/v1/stdlib/REPL/#Numbered-prompt)

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

```
