mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 12:08:31 +02:00
argparse argument setting update
This commit is contained in:
parent
6f1362e80e
commit
cb5e6a6bad
2 changed files with 3 additions and 4 deletions
|
@ -341,12 +341,11 @@ def parse_args(args=[]):
|
||||||
"Specifies alternate config to be used",
|
"Specifies alternate config to be used",
|
||||||
textwrap.dedent("Applies alternate config for current session"),
|
textwrap.dedent("Applies alternate config for current session"),
|
||||||
)
|
)
|
||||||
|
|
||||||
alternate_config.add_argument(
|
alternate_config.add_argument(
|
||||||
"--config-file",
|
"--config-file",
|
||||||
dest="config_file",
|
dest="config_file_path",
|
||||||
action="config_file",
|
|
||||||
type=str,
|
type=str,
|
||||||
nargs=1,
|
|
||||||
default="",
|
default="",
|
||||||
help="""
|
help="""
|
||||||
Overrides default (created when first installed) config file for this command only.
|
Overrides default (created when first installed) config file for this command only.
|
||||||
|
|
|
@ -36,7 +36,7 @@ def run(args):
|
||||||
|
|
||||||
# Load the config, and extract journal name
|
# Load the config, and extract journal name
|
||||||
try:
|
try:
|
||||||
config = install.load_or_install_jrnl(args.config_file)
|
config = install.load_or_install_jrnl(args.config_file_path)
|
||||||
original_config = config.copy()
|
original_config = config.copy()
|
||||||
|
|
||||||
# Apply config overrides
|
# Apply config overrides
|
||||||
|
|
Loading…
Add table
Reference in a new issue