Closed PGS62 closed 2 years ago
how is it different from -i
? when you --load
a file is Julia even considered interactive?
I just tested, if one launches Julia with the --load
option then isinteractive()
does return true
.
I imagine it's unusual to launch Julia with the --load
option set and also to wish for interactive behaviour. I wish to do it in relation to code I have to implement interop between Julia and Microsoft Excel. https://github.com/PGS62/JuliaExcel.jl
Maybe it has to do with https://github.com/KristofferC/OhMyREPL.jl/blob/aa1d7e258f788dfb261ad070fb39657e9c9ab98a/src/OhMyREPL.jl#L91-L93. Probably the commands
bit.
@KristofferC - thanks for pointing me to those lines. In my test (julia --load empty_text_file.jl
) options.isinteractive
has value 0
when line 91 executes and options.commands
has a value different from C_NULL
. Commenting out line 92 seems to makes Ctrl+R work as I'd like it to when Julia's launched with the --load
option.
Would removing lines 91 to 93 be a possibility, or might that cause all sorts of other problems in different use-cases?
Can't you run with julia --load empty_text_file.jl -i
?
Ah, yes that does work. Thanks!
I find that I can't get Ctrl+R (search REPL history) to work if I launch Julia with the
--load
option.More details: OhMyREPL is installed as recommended and Ctrl+R works nicely as soon as Julia launches. But if I launch Julia with the
--load
option then Ctrl R does not launch OhMyREPL's nifty search but instead Julia's built in search. That's true even if the file loaded is empty, and my efforts to amend the loaded file to coax OhMyREPL to work came to naught.