-color help
This commit is contained in:
parent
00cb135913
commit
2280e2963a
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ func main() {
|
||||||
flag.Var(&filter, "where", "sql-like query to filter logs")
|
flag.Var(&filter, "where", "sql-like query to filter logs")
|
||||||
// TODO: change to color-mode=auto/no/always
|
// TODO: change to color-mode=auto/no/always
|
||||||
hasColor := BoolAuto_AUTO
|
hasColor := BoolAuto_AUTO
|
||||||
flag.Var(&hasColor, "color", "dis/enable colors")
|
flag.Var(&hasColor, "color", "dis/enable colors; yes/no/auto")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if hasColor == BoolAuto_NO || (!isatty.IsTerminal(os.Stdout.Fd()) && hasColor != BoolAuto_YES) {
|
if hasColor == BoolAuto_NO || (!isatty.IsTerminal(os.Stdout.Fd()) && hasColor != BoolAuto_YES) {
|
||||||
|
|
Loading…
Reference in a new issue