From 67fac7f1e7f40d49a985970e67a90dcfaf6ea433 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 24 Jun 2015 19:50:51 +0200 Subject: [PATCH] Change --useColors to --colors:on|off and add help Since we introduced automatic colors on terminals (via isatty) there is no way to turn it off, since (undocumented) --useColors just turns them on. This replaces --useColors with --colors:on|off, so anyone who prefers non-colored compiler messages may now turn it off now. --- compiler/commands.nim | 4 +--- doc/advopt.txt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/commands.nim b/compiler/commands.nim index 922cda3c61..e3d3bc4325 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -537,9 +537,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = of "genscript": expectNoArg(switch, arg, pass, info) incl(gGlobalOptions, optGenScript) - of "usecolors": - expectNoArg(switch, arg, pass, info) - incl(gGlobalOptions, optUseColors) + of "colors": processOnOffSwitchG({optUseColors}, arg, pass, info) of "lib": expectArg(switch, arg, pass, info) libpath = processPath(arg, notRelativeToProj=true) diff --git a/doc/advopt.txt b/doc/advopt.txt index a4f72e2d8e..04ffce5b55 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -16,6 +16,7 @@ Advanced commands: Advanced options: -o, --out:FILE set the output filename --stdout output to stdout + --colors:on|off turn compiler messages coloring on|off --listFullPaths list full paths in messages -w, --warnings:on|off turn all warnings on|off --warning[X]:on|off turn specific warning X on|off