mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-30 22:46:12 +02:00
Colorize error and warning messages
This commit is contained in:
parent
00c836032d
commit
1a220243bc
5 changed files with 18 additions and 7 deletions
|
@ -13,6 +13,7 @@ from . import Journal
|
|||
from . import util
|
||||
from . import install
|
||||
from . import plugins
|
||||
from .util import WARNING_COLOR, ERROR_COLOR, RESET_COLOR
|
||||
import jrnl
|
||||
import argparse
|
||||
import sys
|
||||
|
@ -252,7 +253,7 @@ def run(manual_args=None):
|
|||
|
||||
elif args.edit:
|
||||
if not config['editor']:
|
||||
util.prompt("[{1}ERROR{2}: You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH, "\033[31m", "\033[0m"))
|
||||
util.prompt("[{1}ERROR{2}: You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH, ERROR_COLOR, RESET_COLOR))
|
||||
sys.exit(1)
|
||||
other_entries = [e for e in old_entries if e not in journal.entries]
|
||||
# Edit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue