Mislav Marohnić
9c2efd6c1c
Extract reusable IsTerminal()
2020-02-21 12:46:21 +01:00
Mislav Marohnić
a0458956c0
Add docs to color funcs
2019-11-28 11:55:14 +01:00
Mislav Marohnić
e636e3e613
Merge remote-tracking branch 'origin/master' into cygwin-color
2019-11-28 11:52:45 +01:00
Mislav Marohnić
ebb7f39985
Merge remote-tracking branch 'origin/master' into ansi-colorfunc
2019-11-28 11:48:54 +01:00
Mislav Marohnić
b6fa88337d
Ensure that commands print to a colorable output
...
If a command does `fmt.Print(...)` for output that contains ANSI color
codes, this not safe on Windows. We have to ensure that we always use
the `fmt.Fprint*` family of functions with a writer that was transformed
using `utils.NewColorable()`.
2019-11-27 20:51:51 +01:00
Mislav Marohnić
24b04b5fca
Make use of ansi.ColorFunc
...
Speed up repeated calls to color functions by using ansi.ColorFunc to
create a closure per each color.
https://godoc.org/github.com/mgutz/ansi#ColorFunc
2019-11-27 19:16:53 +01:00
Mislav Marohnić
004ab1e9db
Fix color output to Git Bash
2019-11-27 18:58:23 +01:00
nate smith
ffa5ce456a
do not use color when stdout is not a terminal
2019-11-06 10:15:27 -07:00
nate smith
e8634ca5d8
use mgutz/ansi in utils
2019-11-05 13:47:48 -07:00
Corey Johnson
9c218075fb
Add bold
2019-10-15 14:55:15 -07:00
Corey Johnson
cff76fbc22
Use gookit for colors
2019-10-15 14:51:33 -07:00