mirror of
https://github.com/kennethreitz/crayons.git
synced 2026-06-05 23:10:18 +00:00
Disable colors on TERM=dumb
This commit is contained in:
@@ -34,6 +34,8 @@ if 'get_ipython' in dir():
|
||||
else:
|
||||
DISABLE_COLOR = False
|
||||
|
||||
if os.environ["TERM"] == "dumb":
|
||||
DISABLE_COLOR = True
|
||||
|
||||
class ColoredString(object):
|
||||
"""Enhanced string for __len__ operations on Colored output."""
|
||||
|
||||
Reference in New Issue
Block a user