From d0547810304af94b3daa3e645babe79099dacb44 Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Mon, 2 Nov 2015 20:38:11 -0500 Subject: [PATCH] Stop using bold text everywhere Respect the user's default terminal settings. --- base/REPL.jl | 2 +- base/client.jl | 25 ++++++++++--------------- base/version.jl | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/base/REPL.jl b/base/REPL.jl index 7dce1000f758a3..1abf8319c69ce9 100644 --- a/base/REPL.jl +++ b/base/REPL.jl @@ -609,7 +609,7 @@ function history_reset_state(hist::REPLHistoryProvider) end LineEdit.reset_state(hist::REPLHistoryProvider) = history_reset_state(hist) -const julia_green = "\033[1m\033[32m" +const julia_green = "\033[0m\033[32m" function return_callback(s) ast = Base.syntax_deprecation_warnings(false) do diff --git a/base/client.jl b/base/client.jl index 1c544394b8fb1d..a78288c66decb0 100644 --- a/base/client.jl +++ b/base/client.jl @@ -4,14 +4,14 @@ ## and REPL const text_colors = AnyDict( - :black => "\033[1m\033[30m", - :red => "\033[1m\033[31m", - :green => "\033[1m\033[32m", - :yellow => "\033[1m\033[33m", - :blue => "\033[1m\033[34m", - :magenta => "\033[1m\033[35m", - :cyan => "\033[1m\033[36m", - :white => "\033[1m\033[37m", + :black => "\033[30m", + :red => "\033[31m", + :green => "\033[32m", + :yellow => "\033[33m", + :blue => "\033[34m", + :magenta => "\033[35m", + :cyan => "\033[36m", + :white => "\033[37m", :normal => "\033[0m", :bold => "\033[1m", ) @@ -37,13 +37,8 @@ text_colors have_color = false default_color_warn = :red default_color_info = :cyan -if is_windows() - default_color_input = :normal - default_color_answer = :normal -else - default_color_input = :bold - default_color_answer = :bold -end +default_color_input = :normal +default_color_answer = :normal color_normal = text_colors[:normal] function repl_color(key, default) diff --git a/base/version.jl b/base/version.jl index 6bdb1822e35c5c..39890501c0c5c0 100644 --- a/base/version.jl +++ b/base/version.jl @@ -245,7 +245,7 @@ function banner(io::IO = STDOUT) commit_date = GIT_VERSION_INFO.date_string != "" ? " ($(GIT_VERSION_INFO.date_string))": "" if have_color - tx = "\033[0m\033[1m" # text + tx = "\033[0m" # text jl = "\033[0m\033[1m" # julia d1 = "\033[34m" # first dot d2 = "\033[31m" # second dot