From db4d2ddc54df1c10eca0133719d034398b5709cb Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Wed, 16 Apr 2014 13:14:16 -0400 Subject: [PATCH] Warns if using --edit without editor Closes #151 --- jrnl/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jrnl/cli.py b/jrnl/cli.py index 5830aebf..417398a4 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -233,6 +233,9 @@ def run(manual_args=None): install.save_config(original_config, config_path=CONFIG_PATH) elif args.edit: + if not config['editor']: + util.prompt(u"[You need to specify an editor in {0} to use the --edit function.]".format(CONFIG_PATH)) + sys.exit(1) other_entries = [e for e in old_entries if e not in journal.entries] # Edit old_num_entries = len(journal)