Skip to content

Commit

Permalink
Stop using bold text everywhere
Browse files Browse the repository at this point in the history
Respect the user's default terminal settings.
  • Loading branch information
jayschwa committed Sep 14, 2016
1 parent 30bf89f commit d054781
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion base/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 10 additions & 15 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion base/version.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d054781

Please sign in to comment.