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

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