mirror of
1
0
Fork 0
dotbot/dotbot/messenger
Bob Whitelock 2432a2ba87 Add `--force-color` option
This forces Dotbot to produce colored output, regardless of whether it
is outputting to a TTY.

This is useful to support use cases such as piping colored Dotbot output
into another program for formatting (e.g. I want to indent the output as
part of a larger installation script); this was not previously easy to
do as this would cause the output to lose its colored formatting.

This option cannot be provided at the same time as the existing
`--no-color` option, as there's no logical interpretation of what effect
providing both of these should have.

As part of this change I've refactored some existing code determining
whether output should be colored to where options are parsed, as this
made this change simpler and I think it makes sense for all this logic
to be performed in the same place.
2020-08-23 00:02:26 +01:00
..
__init__.py Initial commit 2014-03-20 18:57:56 -04:00
color.py Initial commit 2014-03-20 18:57:56 -04:00
level.py Initial commit 2014-03-20 18:57:56 -04:00
messenger.py Add `--force-color` option 2020-08-23 00:02:26 +01:00