diff --git a/cheat b/cheat index 2abc94a..ce8592c 100755 --- a/cheat +++ b/cheat @@ -3,7 +3,8 @@ import os import sys import subprocess -DEFAULT_CHEAT_DIR = os.path.join(os.path.expanduser('~'), '.cheat') +DEFAULT_CHEAT_DIR = os.environ.get('DEFAULT_CHEAT_DIR') or \ + os.path.join(os.path.expanduser('~'), '.cheat') USE_PYGMENTS = False # NOTE remove this check if it is confirmed to work on windows @@ -140,6 +141,7 @@ def main(): elif option in ['-c', '--create']: create_cheatsheet(' '.join(sys.argv[2:]), cheatsheets) + # print the cheatsheet if it exists if keyphrase in cheatsheets: filename = os.path.join(cheatsheets[keyphrase], keyphrase)