We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
~/.julia/logs/repl_history.jl
1 parent 33ca610 commit 74ec1f9Copy full SHA for 74ec1f9
stdlib/REPL/src/REPL.jl
@@ -671,16 +671,8 @@ function return_callback(s)
671
end
672
673
674
-function find_hist_file()
675
- filename = ".julia_history"
676
- if isfile(filename)
677
- return filename
678
- elseif haskey(ENV, "JULIA_HISTORY")
679
- return ENV["JULIA_HISTORY"]
680
- else
681
- return joinpath(homedir(), filename)
682
- end
683
-end
+find_hist_file() = get(ENV, "JULIA_HISTORY",
+ joinpath(homedir(), ".julia", "logs", "repl_history.jl"))
684
685
backend(r::AbstractREPL) = r.backendref
686
@@ -837,6 +829,7 @@ function setup_interface(
837
829
if repl.history_file
838
830
try
839
831
hist_path = find_hist_file()
832
+ mkpath(dirname(hist_path))
840
833
f = open(hist_path, read=true, write=true, create=true)
841
834
finalizer(replc) do replc
842
835
close(f)
0 commit comments