Skip to content

Commit ccef01a

Browse files
xal-0vtjnashDilumAluthge
authored
Print fallback REPL prompt before user input (#58210)
Using the fallback REPL interactively prints the prompt only after user input, making the scrollback confusing: ``` $ JULIA_FALLBACK_REPL=1 julia 1 + 2 julia> 3 ``` --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
1 parent 3864b18 commit ccef01a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/client.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,12 @@ function run_fallback_repl(interactive::Bool)
442442
eval_user_input(stderr, ex, true)
443443
end
444444
else
445-
while !eof(input)
445+
while true
446446
if interactive
447447
print("julia> ")
448448
flush(stdout)
449449
end
450+
eof(input) && break
450451
try
451452
line = ""
452453
ex = nothing

0 commit comments

Comments
 (0)