mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 22:11:35 +01:00
give user the option to edit cheatsheet when trying to create an existing cheatsheet
This commit is contained in:
parent
bbabedb3ce
commit
ffcafa4480
6
cheat
6
cheat
@ -64,7 +64,11 @@ def edit_cheatsheet(cheat, cheatsheets):
|
|||||||
def create_cheatsheet(cheat, cheatsheets):
|
def create_cheatsheet(cheat, cheatsheets):
|
||||||
"Create a new cheatsheet."
|
"Create a new cheatsheet."
|
||||||
if cheat in cheatsheets:
|
if cheat in cheatsheets:
|
||||||
print ('Cheatsheet "%s" already exists' % cheat)
|
print ('Cheatsheet "%s" already exists...' % cheat)
|
||||||
|
ans = raw_input('Would you like to edit cheatsheet for "%s" (Y/N)? ' % cheat)
|
||||||
|
if ans.lower() in ['y', 'yes']:
|
||||||
|
edit_cheatsheet(cheat, cheatsheets)
|
||||||
|
else:
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
import cheatsheets as cs
|
import cheatsheets as cs
|
||||||
|
Loading…
Reference in New Issue
Block a user