From b61bd2078549b48c420b43922221394c88097d41 Mon Sep 17 00:00:00 2001 From: Tom Gurion Date: Fri, 19 Sep 2014 12:52:59 +0300 Subject: [PATCH] Colorize output if HOWDOI_COLORIZE environment variable is set --- howdoi/howdoi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/howdoi/howdoi.py b/howdoi/howdoi.py index 2af1c55ef..f011bbdd1 100755 --- a/howdoi/howdoi.py +++ b/howdoi/howdoi.py @@ -250,6 +250,9 @@ def command_line_runner(): if not os.getenv('HOWDOI_DISABLE_CACHE'): enable_cache() + if os.getenv('HOWDOI_COLORIZE'): + args['color'] = True + if sys.version < '3': print(howdoi(args).encode('utf-8', 'ignore')) else: