Skip to content

Commit

Permalink
add msg for wtf when no macros saved
Browse files Browse the repository at this point in the history
  • Loading branch information
irapha committed Apr 7, 2016
1 parent 1cc1ce6 commit ffad110
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tbh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def find(macro=None):
hist = load(all_macros=True)

if macro is None:
print('macros: ' + ', '.join(hist.keys()))
if len(hist) == 0:
print('no macros saved')
else:
print('macros: ' + ', '.join(hist.keys()))
elif macro not in hist:
print('macro not found: ' + macro)
else:
Expand Down

0 comments on commit ffad110

Please sign in to comment.