Add --co alias for --config-override

This commit is contained in:
Micah Jerome Ellison 2022-01-15 12:52:50 -08:00
parent 49930e16f7
commit 58d5b9b11c
2 changed files with 14 additions and 0 deletions

View file

@ -336,6 +336,15 @@ def parse_args(args=[]):
\t jrnl --config-override colors.body blue --config-override colors.title green \t jrnl --config-override colors.body blue --config-override colors.title green
""", """,
) )
config_overrides.add_argument(
"--co",
dest="config_override",
action="append",
type=str,
nargs=2,
default=[],
help=argparse.SUPPRESS,
)
alternate_config = parser.add_argument_group( alternate_config = parser.add_argument_group(
"Specifies alternate config to be used", "Specifies alternate config to be used",

View file

@ -45,6 +45,11 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys
When we run "jrnl -1 --config-override colors.body blue" When we run "jrnl -1 --config-override colors.body blue"
Then the config in memory should contain "colors.body: blue" Then the config in memory should contain "colors.body: blue"
Scenario: Override color selections with --co alias
Given we use the config "basic_encrypted.yaml"
And we use the password "test" if prompted
When we run "jrnl -1 --co colors.body blue"
Then the config in memory should contain "colors.body: blue"
Scenario: Apply multiple config overrides Scenario: Apply multiple config overrides
Given we use the config "basic_encrypted.yaml" Given we use the config "basic_encrypted.yaml"