diff --git a/jrnl/cli.py b/jrnl/cli.py index 90088108..d1fa53a4 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -183,10 +183,12 @@ def run(manual_args=None): else: _exit_multiline_code = "press Ctrl+D" - if mode_compose and not args.text: + partial_raw = " ".join(args.text).split(':') + + if mode_compose and partial_raw[1].strip() == '': if not sys.stdin.isatty(): # Piping data into jrnl - raw = util.py23_read() + raw = partial_raw + ': ' + util.py23_read() elif config['editor']: template = "" if config['template']: @@ -195,10 +197,10 @@ def run(manual_args=None): except: util.prompt("[Could not read template at '']".format(config['template'])) sys.exit(1) - raw = util.get_text_from_editor(config, template) + raw = partial_raw + ': ' + util.get_text_from_editor(config, template) else: try: - raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") + raw = partial_raw + ': ' + util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") except KeyboardInterrupt: util.prompt("[Entry NOT saved to journal.]") sys.exit(0)