mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Change break msg for Windows
for multiline input on Windows, you need Ctrl+Z to exit
This commit is contained in:
parent
6cf0651e32
commit
e176e1145b
1 changed files with 8 additions and 1 deletions
|
@ -156,6 +156,13 @@ def cli(manual_args=None):
|
||||||
else:
|
else:
|
||||||
journal = Journal.Journal(journal_name, **config)
|
journal = Journal.Journal(journal_name, **config)
|
||||||
|
|
||||||
|
if "win32" in sys.platform:
|
||||||
|
# for Windows systems
|
||||||
|
_exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter"
|
||||||
|
else:
|
||||||
|
# for *nix systems (and others?)
|
||||||
|
_exit_multiline_code = "press Ctrl+D"
|
||||||
|
|
||||||
if mode_compose and not args.text:
|
if mode_compose and not args.text:
|
||||||
if not sys.stdin.isatty():
|
if not sys.stdin.isatty():
|
||||||
# Piping data into jrnl
|
# Piping data into jrnl
|
||||||
|
@ -163,7 +170,7 @@ def cli(manual_args=None):
|
||||||
elif config['editor']:
|
elif config['editor']:
|
||||||
raw = get_text_from_editor(config)
|
raw = get_text_from_editor(config)
|
||||||
else:
|
else:
|
||||||
raw = util.py23_read("[Compose Entry, press Ctrl+D to finish writing]\n")
|
raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n")
|
||||||
if raw:
|
if raw:
|
||||||
args.text = [raw]
|
args.text = [raw]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue