REPL internals documentation

Hello everybody,

I am looking for documentation concerning the REPL internals. Background:

I was trying to understand the insertion of additional input modes and keymappings done in this simple program:
https://github.com/tshort/Calc.jl/blob/master/src/Calc.jl
I was not able to find documentation concerning the REPL internal functions called, e.g. REPL.respond, REPL.return_callback or LineEdit. Looking at julia/base/REPL.jl directly I see that is does also not conatin any documentation at all.

Best Regards

Christof

2 Likes

Providing a real API and documentation for the REPL stuff is definitely a relatively high priority project for post 1.0, but it hasn’t made it to the top of the todo list just yet. The general approach (which I used when implementing the REPL mode for Pkg3) is to look at some package which has a REPL mode and modify it until it works. Clearly not ideal, but it works. If you want to use Pkg3’s REPL mode as starting point, the relevant code is here:

https://github.com/JuliaLang/Pkg3.jl/blob/776d31a58b6f542158d899588908b733ef2e5e4f/src/REPLMode.jl#L492-L547

2 Likes

Hello,

thank you for the answer. I will try it.

Best Regards

Christof