nate
d06f819f42
remove public from Colorizer properties and use ColorizerOption instead.
2017-05-29 13:04:47 -04:00
nate
4293013c26
clean up. fix lint and formatting.
2017-05-29 13:04:47 -04:00
nate
f400fa6e7f
refactor color macro. refactor Colorizer to have ColorizerOption.
2017-05-29 13:04:47 -04:00
nate
f915f9ce42
add ColorizeOption and add function "new" for Colorizer
...
it has logic where checking tty is valid and if TERM is dumb when coloring
a message.
2017-05-29 13:04:47 -04:00
nate
3185511f3b
when TERM=dumb
, the output is colorless #847
...
comply to
2017-05-29 13:04:47 -04:00
Peter Williams
68e03681d8
refactor: use the atty crate for isatty() detection
...
Not only does this remove some unsafe code from clap itself, `atty` does the
right thing on Windows too. This isn't relevant now since we don't currently
support colorized output on Windows, but will come in handy if/when we
implement that feature (#836 ).
2017-02-19 11:12:55 -05:00
Kevin K
988b9cbea4
style: standardizes debug calls and output
...
Closes #792
2016-12-29 23:34:46 -05:00
Kevin K
80cc68748d
chore: rustfmt run
2016-11-20 14:47:04 -05:00
tormol
da88fd254b
style: only ignore clippy warning if lints are enabled
...
else you get another warning!
2016-10-16 11:31:12 +02:00
tormol
7f797e68d8
style: fix lints in code that's not compiled if the opt-out feature "color" is set
2016-10-05 23:16:22 +02:00
Kevin K
0dcfc77dae
tests(Debugging): standardizes certain debugging calls
2016-09-12 21:48:22 -04:00
Kevin K
b246be1a4b
style: rustfmt run
2016-09-05 17:03:45 -04:00
Kevin K
07e6e8ea31
style: rustfmt run
2016-09-05 15:29:40 -04:00
Kevin K
01e7dfd6c0
fix(Windows): fixes a failing windows build
2016-06-07 20:49:18 -04:00
Kevin K
65c2350aa3
feat: colors dont get sent to pipes by default
...
Color are now only used when outputting to a termainal/TTY. There are three new settings as well
which can be used to control color output, they are:
* `AppSettings::ColorAuto`: The default, and will only output color when outputting to a terminal or TTY
* `AppSettings::ColorAlways`: Outputs color no matter where the output is going
* `AppSettings::ColorNever`: Never colors output
This now allows one to use things like command line options, or environmental variables to turn
colored output on/off.
Closes #512
2016-06-04 11:28:03 -04:00
Kevin K
ffde90f2ba
style: rustfmt run
2016-05-06 17:52:23 -04:00
Kevin K
cb708093a7
docs: hides formatting from docs
2016-05-02 18:04:10 -04:00
Kevin K
2b6511fe65
tests(fmt): removes fmt tests from Windows builds
2015-12-18 09:01:59 -05:00
Kevin K
d0c13d2960
style: rustfmt run
2015-10-28 10:56:10 -04:00
Kevin K
f161ffa470
chore: updates and implements lint findings
2015-10-28 10:55:26 -04:00
Kevin K
40229efd99
style: post rustfmt run
2015-09-06 21:37:45 -04:00
Kevin K
63dbc5569f
tests: adds tests for colored output
2015-09-04 11:59:33 -04:00
Kevin K
9cb5dceb3e
fix: fixes formatting bug which prevented compiling on windows
...
Closes #163
2015-07-18 14:31:09 -04:00
Kevin K
d6c3ed54d2
imp(Colors): implements more structured colored output
...
Closes #129
2015-05-22 23:01:20 -04:00