From a56b395b7a69433d669472328ed830677636f08d Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 23 Jul 2012 11:16:15 +0200 Subject: [PATCH] Fixes a bug where jrnl would not go into compose mode if the entry comes from command line, is wrapped into quotes and starts with a tag symbol --- jrnl/jrnl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 07de206c..7e9f6587 100755 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -54,13 +54,14 @@ def guess_mode(args, config): """Guesses the mode (compose, read or export) from the given arguments""" compose = True export = False + print args if args.json or args.decrypt is not False or args.encrypt is not False or args.markdown or args.tags or args.delete_last: compose = False export = True elif args.start_date or args.end_date or args.limit or args.strict or args.short: # Any sign of displaying stuff? compose = False - elif not args.date and args.text and all(word[0] in config['tagsymbols'] for word in args.text): + elif not args.date and args.text and all(word[0] in config['tagsymbols'] for word in " ".join(args.text).split()): # No date and only tags? compose = False