Made it also necessary to set an environment variable in order to display colors to the terminal (in an effort to avoid an otherwise inevitable holy-war).

This commit is contained in:
Chris Lane 2013-08-21 22:56:33 -04:00
parent fabd1bc242
commit c15e836268
1 changed files with 2 additions and 2 deletions

2
cheat
View File

@ -6,7 +6,7 @@ DEFAULT_CHEAT_DIR = os.path.join(os.path.expanduser('~'), '.cheat')
USE_PYGMENTS = False USE_PYGMENTS = False
# NOTE remove this check if it is confirmed to work on windows # NOTE remove this check if it is confirmed to work on windows
if os.name == 'posix': if os.name == 'posix' and 'CHEATCOLORS' in os.environ:
try: try:
from pygments import highlight from pygments import highlight
from pygments.util import ClassNotFound from pygments.util import ClassNotFound