A bug was introduced in 2.1.6 that would prevent user-defined
cheatsheets from being edited more than once.
This commit is contained in:
Chris Lane 2015-02-11 21:45:32 -05:00
parent d14c759a48
commit e9b8f04c24
3 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,7 @@ from docopt import docopt
if __name__ == '__main__': if __name__ == '__main__':
# parse the command-line options # parse the command-line options
options = docopt(__doc__, version='cheat 2.1.6') options = docopt(__doc__, version='cheat 2.1.7')
# list directories # list directories
if options['--directories']: if options['--directories']:

View File

@ -32,6 +32,10 @@ def create_or_edit(sheet):
copy(path(sheet), os.path.join(sheets.default_path(), sheet)) copy(path(sheet), os.path.join(sheets.default_path(), sheet))
edit(sheet) edit(sheet)
# if it exists and is in the default path, then just open it
else:
edit(sheet)
def create(sheet): def create(sheet):
""" Creates a cheatsheet """ """ Creates a cheatsheet """

View File

@ -3,7 +3,7 @@ import os
setup( setup(
name = 'cheat', name = 'cheat',
version = '2.1.6', version = '2.1.7',
author = 'Chris Lane', author = 'Chris Lane',
author_email = 'chris@chris-allen-lane.com', author_email = 'chris@chris-allen-lane.com',
license = 'GPL3', license = 'GPL3',