Skip to content

Commit dc3aef0

Browse files
committed
Hide -color (string option) and add -nocolor (bool option)
1 parent 8ccbd56 commit dc3aef0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ var (
2828

2929
var (
3030
flagOneLineScript = flag.String("e", "", "code\vexecute code")
31-
flagColor = flag.String("color", "always", "[always|never] (default: always)\vcolorize the output")
31+
flagColor = flag.String("color", "always", "")
32+
flagNoColor = flag.Bool("nocolor", false, "disable color")
3233
flagCompile = flag.String("compile", "", "executable-name\vcompile executable with <script>.lua embedded; script is not executed")
3334
flagDebug = flag.Bool("D", false, "print debug information")
3435
_ = flag.Bool("nologo", false, "")
@@ -124,7 +125,7 @@ func mains() error {
124125
flag.Usage = newUsage
125126
flag.Parse()
126127

127-
if *flagColor == "never" {
128+
if *flagColor == "never" || *flagNoColor {
128129
escEcho = ""
129130
escSend = ""
130131
escSpawn = ""

0 commit comments

Comments
 (0)