Skip to content

Commit

Permalink
adds numbered prompt in REPL
Browse files Browse the repository at this point in the history
  • Loading branch information
gzagatti committed May 31, 2023
1 parent ab68bbc commit d9d60db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions julia/startup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@ atreplinit() do repl

# margin between welcome message and first prompt
println()

# https://docs.julialang.org/en/v1/stdlib/REPL/#Numbered-prompt
@eval using REPL
if !isdefined(repl, :interface)
repl.interface = REPL.setup_interface(repl)
end
REPL.numbered_prompt!(repl)

end

let theme = get(ENV, "THEME", "")
if theme == "leuven"
# colors in the REPL are sourced from Base.text_colors
# see: https://github.com/JuliaLang/julia/blob/master/base/client.jl
# ENV["JULIA_ERROR_COLOR"] = 1
# ENV["JULIA_WARN_COLOR"] = 3
ENV["JULIA_ERROR_COLOR"] = 1
ENV["JULIA_WARN_COLOR"] = 3

# no point in printing light colors if you cannot see
# the leuven way is to add a light background when printing light colors
Expand Down

0 comments on commit d9d60db

Please sign in to comment.