I’d like to know how I could change the julia> prompt REPL when I activate a project. In the package manager prompt, the environments are indicated, but not when I go back to the REPL. I think it would be less confusing if we can know in which environment we are.
user@Linux-Roy:~$ julia
ERROR: LoadError: UndefVarError: active_repl not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
[2] top-level scope at none:0
[3] include at ./boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1041
[5] include at ./sysimg.jl:29 [inlined]
[6] include_ifexists at ./client.jl:191 [inlined]
[7] load_julia_startup() at ./client.jl:288
[8] exec_options(::Base.JLOptions) at ./logging.jl:312
[9] _start() at ./client.jl:421
in expression starting at /home/user/.julia/config/startup.jl:18
Indeed, I can confirm that the prompt does not update to the new one when I switch between project.
edit - I’m now loading a function in startup.jl. So, when I switch projetcs, I need to execute ap(). I’m sure there’s a better way to do it. I think that it might be a good feature/bahaviour for a 1.0.2 release.
function ap()
Base.active_repl.interface.modes[1].prompt = Pkg.REPLMode.promptf()[1:end-6] * " julia> "
end