File tree 4 files changed +13
-20
lines changed
4 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Usage: $(basename "$0") [options] [.exs file] [data]
18
18
-pz "PATH" Appends the given path to Erlang code path (*)
19
19
-v, --version Prints Erlang/OTP and Elixir versions (standalone)
20
20
21
- --color BOOL Enables or disables ANSI coloring
21
+ --color, --no-color Enables or disables ANSI coloring
22
22
--erl "SWITCHES" Switches to be passed down to Erlang (*)
23
23
--eval "COMMAND" Evaluates the given command, same as -e (*)
24
24
--logger-otp-reports BOOL Enables or disables OTP reporting
@@ -112,10 +112,10 @@ while [ $I -le $LENGTH ]; do
112
112
C=1
113
113
MODE=" iex"
114
114
;;
115
- -v|--no-halt)
115
+ -v|--no-halt|--color|--no-color )
116
116
C=1
117
117
;;
118
- -e|-r|-pr|-pa|-pz|--eval|--remsh|--dot-iex|--dbg|--color )
118
+ -e|-r|-pr|-pa|-pz|--eval|--remsh|--dot-iex|--dbg)
119
119
C=2
120
120
;;
121
121
--rpc-eval)
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ echo -pa "PATH" Prepends the given path to Erlang code path
24
24
echo -pz " PATH" Appends the given path to Erlang code path (*)
25
25
echo -v, --version Prints Erlang/OTP and Elixir versions (standalone)
26
26
echo .
27
- echo --color BOOL Enables or disables ANSI coloring
27
+ echo --color, --no-color Enables or disables ANSI coloring
28
28
echo --erl " SWITCHES" Switches to be passed down to Erlang (*)
29
29
echo --eval " COMMAND" Evaluates the given command, same as -e (*)
30
30
echo --logger-otp-reports BOOL Enables or disables OTP reporting
@@ -108,10 +108,11 @@ if ""==!par:-pz=! (shift && goto startloop)
108
108
if " " == !par:-v =! (goto startloop)
109
109
if " " == !par:--version =! (goto startloop)
110
110
if " " == !par:--no-halt =! (goto startloop)
111
+ if " " == !par:--color =! (goto startloop)
112
+ if " " == !par:--no-color =! (goto startloop)
111
113
if " " == !par:--remsh =! (shift && goto startloop)
112
114
if " " == !par:--dot-iex =! (shift && goto startloop)
113
115
if " " == !par:--dbg =! (shift && goto startloop)
114
- if " " == !par:--color =! (shift && goto startloop)
115
116
rem ******* ERLANG PARAMETERS **********************
116
117
if " " == !par:--boot =! (set " parsErlang=!parsErlang! -boot " %~1 " " && shift && goto startloop)
117
118
if " " == !par:--boot-var =! (set " parsErlang=!parsErlang! -boot_var " %~1 " " %~2 " " && shift && shift && goto startloop)
Original file line number Diff line number Diff line change @@ -295,21 +295,13 @@ defmodule Kernel.CLI do
295
295
parse_argv ( t , % { config | commands: [ { :parallel_require , h } | config . commands ] } )
296
296
end
297
297
298
- defp parse_argv ( [ ~c" --color" , value | t ] , config ) do
299
- config =
300
- case value do
301
- ~c" true" ->
302
- Application . put_env ( :elixir , :ansi_enabled , true )
303
- config
304
-
305
- ~c" false" ->
306
- Application . put_env ( :elixir , :ansi_enabled , false )
307
- config
308
-
309
- _ ->
310
- % { config | errors: [ "--color : must be a boolean" | config . errors ] }
311
- end
298
+ defp parse_argv ( [ ~c" --color" | t ] , config ) do
299
+ Application . put_env ( :elixir , :ansi_enabled , true )
300
+ parse_argv ( t , config )
301
+ end
312
302
303
+ defp parse_argv ( [ ~c" --no-color" | t ] , config ) do
304
+ Application . put_env ( :elixir , :ansi_enabled , true )
313
305
parse_argv ( t , config )
314
306
end
315
307
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ defmodule Mix.Tasks.Test do
113
113
and imports (but not local functions). You can press `n` for the next line
114
114
and `c` for the next test. This automatically sets `--trace`
115
115
116
- * `--color` - enables color in the output
116
+ * `--color` - enables color in ExUnit formatting results
117
117
118
118
* `--cover` - runs coverage tool. See "Coverage" section below
119
119
You can’t perform that action at this time.
0 commit comments