Skip to content

Commit

Permalink
Enable color output whenever stdout is TTY
Browse files Browse the repository at this point in the history
  • Loading branch information
karan0299 committed Jan 12, 2020
1 parent 7e6ef91 commit ddc9e3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ function exec_options(opts)
global have_color = (opts.color == 1) # --color=on
global is_interactive = (opts.isinteractive != 0)

#check if stdout is TTY and color is not set manually
if isa(stdout, TTY) && !color_set
global have_color = true
end

# pre-process command line argument list
arg_is_program = !isempty(ARGS)
repl = !arg_is_program
Expand Down

0 comments on commit ddc9e3c

Please sign in to comment.