You can call REPL.setup_inferface yourself and add your own REPL mode. You
can also look at
https://github.com/JuliaLang/julia/blob/master/base/client.jl to see how
the active_repl gets created.

On Fri, Apr 15, 2016 at 9:16 AM, <[email protected]> wrote:

> I have a REPL mode for an application:
> https://github.com/jlapeyre/SJulia.jl/blob/master/src/sjulia_repl.jl
>
> I start julia in a terminal,  load the package with 'using SJulia', and
> then press '=' to enter the alternative mode.  This works fine.
>
> I would like to do this in one step. e.g.  enter 'sjulia' in a terminal
> and then start in the alternative mode. Problems are:
>
> 1. I have to execute a julia function to start the REPL mode 'after' the
> REPL starts and I see the julia prompt. Otherwise there is no active REPL.
> Using .juliarc.jl or julia -e apparently loads and runs code before
> starting the REPL.  I would like the alternative REPL mode to be created
> without entering anything at the julia prompt.
>
> 2. Once I create the alternative REPL, I am still in the standard julia
> REPL mode. To switch to the alternative mode, I enter '='. I would like to
> enter this mode automatically. There is a function Base.LineEdit.transition
> that seems to do this. But, it takes a data structure (of type
> Base.LineEdit.MIState' ) as an argument that I don't know how to get at.  I
> can probably find it buried somewhere in Base.active_repl, but, I have not
> been able to so far.
>
> -John
>

Reply via email to