ANN: REPLHistory

Gain access to the Julia REPL history.

2 Likes

Can you say a few words here about what this package does, or at least give a link to the README?

4 Likes

Looking at the code it seems that it prints the n number of last entries from the Julia REPL.

It seems pretty strange for this to be a macro and have all the work be done as a side effect of macro expansion time though. For example

julia> using REPLHistory

julia> function f()
           @history 5
       end
1
using REPLHistory
function f()
f (generic function with 1 method)

julia> f()
# nothing here

Why isn’t it just history(5)? Also, maybe it should return the string, instead of just printing it as a side effect, so you can do something with it?

6 Likes

Good feedback, thanks!