It seems it is not possible to have both the new IPython prompt in Julia 1.9, and a custom OhMyREPL prompt at the same time.
With this startup.jl, a custom prompt is displayed:
atreplinit() do repl
if !isdefined(repl, :interface)
repl.interface = REPL.setup_interface(repl)
end
REPL.numbered_prompt!(repl)
try
@eval using OhMyREPL
@eval OhMyREPL.input_prompt!(() -> "("*splitpath(Base.active_project())[end-1]*") julia> ")
catch e
@warn "error while importing OhMyREPL" e
end
end
Writing the if block below the try block results in the IPython prompt. So, it seems configuring one prompt overrides the other.
Interestingly, the Out dictionary is still enabled when the custom prompt is displayed, but it only records the last result:
(v1.9) julia> 1+1
2
(v1.9) julia> Out
Dict{Int64, Any} with 1 entry:
0 => 2
(v1.9) julia> 2+2
4
(v1.9) julia> Out
Dict{Int64, Any} with 1 entry:
0 => 4
Maybe a reasonable compromise would be to supress the In prompt when using a custom prompt, but still show a functional Out prompt.
It seems it is not possible to have both the new IPython prompt in Julia 1.9, and a custom OhMyREPL prompt at the same time.
With this
startup.jl
, a custom prompt is displayed:Writing the
if
block below thetry
block results in theIPython
prompt. So, it seems configuring one prompt overrides the other.Interestingly, the
Out
dictionary is still enabled when the custom prompt is displayed, but it only records the last result:Maybe a reasonable compromise would be to supress the
In
prompt when using a custom prompt, but still show a functionalOut
prompt.