Var renames

Replaced more references to deprecated envvar names to their newer
counterparts.
This commit is contained in:
Chris Lane 2019-01-31 17:53:34 -05:00
parent 7c4fc54681
commit 145a81dcd6
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ Usage:
cheat -v
Options:
-d --directories List directories on CHEATPATH
-d --directories List directories on $CHEAT_PATH
-e --edit Edit cheatsheet
-l --list List cheatsheets
-s --search Search cheatsheets for <keyword>

View File

@ -13,12 +13,12 @@ class Sheet:
def copy(self, current_sheet_path, new_sheet_path):
""" Copies a sheet to a new path """
# attempt to copy the sheet to DEFAULT_CHEAT_DIR
# attempt to copy the sheet to CHEAT_DEFAULT_DIR
try:
shutil.copy(current_sheet_path, new_sheet_path)
# fail gracefully if the cheatsheet cannot be copied. This can happen
# if DEFAULT_CHEAT_DIR does not exist
# if CHEAT_DEFAULT_DIR does not exist
except IOError:
Utils.die('Could not copy cheatsheet for editing.')

View File

@ -67,15 +67,15 @@ class Sheets:
self.default_path(),
]
# merge the CHEATPATH paths into the sheet_paths
# merge the CHEAT_PATH paths into the sheet_paths
if self._config.cheat_path:
for path in self._config.cheat_path.split(os.pathsep):
if os.path.isdir(path):
sheet_paths.append(path)
if not sheet_paths:
Utils.die('The DEFAULT_CHEAT_DIR dir does not exist '
+ 'or the CHEATPATH is not set.')
Utils.die('The CHEAT_DEFAULT_DIR dir does not exist '
+ 'or the CHEAT_PATH is not set.')
return sheet_paths