Is there an easy way to get at the history of REPL input?

Man I love the Julia community. I feel like I have a magic lamp. And also the Genie has a time machine because what I wish for usually already has been made and is even in the registry!

I wonder though, might this belong in InteractiveUtils.jl? I can also think of a lot of enhancements that could really help with REPL productivity. Mostly some of the creature comforts I recall from IPython.

1 Like

Somewhat related: I just realized that OhMyREPL has enhanced history search which is pretty sweet, though it doesn’t AFAICT have a way to narrow to just the current session. I opened a feature request issue for that: FR: Limit history to current session · Issue #238 · KristofferC/OhMyREPL.jl · GitHub

1 Like

Not sure if this has been mentioned:

  • In Windows with the *.jl file extension registered for opening with VS Code, adding the following to startup.jl will open the REPL history in a VS Code tab, that updates automatically as more commands are typed:
path = raw"C:\Users\jrafa\.julia\logs\repl_history.jl"
run(`cmd /c code "" $path`)

or one may define a history() function instead:

history() = run(`cmd /c code "" "C:\Users\jrafa\.julia\logs\repl_history.jl"`)

NB: inspired by this @greg_plowman’s post

1 Like

but does it work on mac?