Skip to content

Commit

Permalink
Colorize output if HOWDOI_COLORIZE environment variable is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagasaki45 committed Sep 19, 2014
1 parent dd84957 commit b61bd20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions howdoi/howdoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b61bd20

Please sign in to comment.