求助!我不小心删除了~/.julia/logs
文件夹。
但是好消息是,我有几个正在运行的julia会话,它们似乎记住了julia REPL历史记录。
请问有没有人知道是否有一种方法可以从运行中的julia进程状态中反向转储历史文件?非常感谢!
求助!我不小心删除了~/.julia/logs
文件夹。
但是好消息是,我有几个正在运行的julia会话,它们似乎记住了julia REPL历史记录。
请问有没有人知道是否有一种方法可以从运行中的julia进程状态中反向转储历史文件?非常感谢!
.julia/logs/repl_history.jl
中:function restore_repl_history()
hist = Base.active_repl.interface.modes[1].hist
open("restored_history.jl", "w") do io
for (mode, cont) in zip(hist.modes, hist.history)
println(io, "# time: $(Libc.strftime("%Y-%m-%d %H:%M:%S %Z", time()))")
println(io, "# mode: $mode")
s = join(split(cont, '\n'), "\n\t")
println(io, "\t", s)
end
end
end