Can I save the code I typed in the REPL?

Hi everyone,

I’m very new to Julia. This is my first question here in Discourse. Before asking I looked it up using the search function and could not see an answer for it.

Say I have written a few lines of code in the REPL. I want to know if there is a way to save the typed code (not the output) as a .jl file without doing any cutting and pasting. I think I know ways to do this in Pluto and VS Code but I want to know if it can be done in the REPL directly.

Thank you!

The REPL history is in the file .julia/logs/repl_history.jl, at least on Linux.

1 Like

Thank you. After reading your answer I knew what to search for and came across this package, which I found useful: https://github.com/PetrKryslUCSD/REPLHistory.jl

and for reference I found that in this post: Is there an easy way to get at the history of REPL input?

1 Like