diff --git a/jrnl/install.py b/jrnl/install.py index ee004c53..4aff7cac 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -109,8 +109,12 @@ def install(): # Where to create the journal? default_journal_path = get_default_journal_path() - path_query = f"Path to your journal file (leave blank for {default_journal_path}): " - journal_path = os.path.abspath(input(path_query).strip() or default_journal_path) + user_given_path = print_msg( + Message(MsgText.InstallJournalPathQuestion, MsgStyle.PROMPT), + get_input=True, + ) + journal_path = os.path.abspath(user_given_path or default_journal_path) + default_config = get_default_config() default_config["journals"][DEFAULT_JOURNAL_KEY] = os.path.expanduser( os.path.expandvars(journal_path) diff --git a/jrnl/messages.py b/jrnl/messages.py index 7c40b60a..9b5c95c1 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -69,6 +69,9 @@ class MsgText(Enum): AllDoneUpgrade = "We're all done here and you can start enjoying jrnl 2" # --- Prompts --- # + InstallJournalPathQuestion = """ + Path to your journal file (leave blank for {default_journal_path}): + """ DeleteEntryQuestion = "Delete entry '{entry_title}'?" EncryptJournalQuestion = """ Do you want to encrypt your journal? (You can always change this later)