From cb5e6a6bad671383f533e356b7c79872ed15926c Mon Sep 17 00:00:00 2001 From: samuelgregorovic Date: Tue, 6 Jul 2021 17:34:14 +0200 Subject: [PATCH] argparse argument setting update --- jrnl/args.py | 5 ++--- jrnl/jrnl.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jrnl/args.py b/jrnl/args.py index e7980ac5..479137b2 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -341,12 +341,11 @@ def parse_args(args=[]): "Specifies alternate config to be used", textwrap.dedent("Applies alternate config for current session"), ) + alternate_config.add_argument( "--config-file", - dest="config_file", - action="config_file", + dest="config_file_path", type=str, - nargs=1, default="", help=""" Overrides default (created when first installed) config file for this command only. diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 71b5590c..e6ec586b 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -36,7 +36,7 @@ def run(args): # Load the config, and extract journal name try: - config = install.load_or_install_jrnl(args.config_file) + config = install.load_or_install_jrnl(args.config_file_path) original_config = config.copy() # Apply config overrides