diff --git a/src/rougail/cli/__main__.py b/src/rougail/cli/__main__.py index 4c0cbec..bb81c1c 100644 --- a/src/rougail/cli/__main__.py +++ b/src/rougail/cli/__main__.py @@ -38,7 +38,8 @@ def _main(): backward_compatibility=False, add_extra_options=False ) cmd_config = rougailconfig.config - cmd_config.property.setdefault(frozenset("not_for_commandline"), 'read_write', 'append') + origin_prop = cmd_config.property.default('read_write', 'append') + cmd_config.property.setdefault(frozenset(origin_prop | {"not_for_commandline"}), 'read_write', 'append') cmd_config.property.read_write() if RougailUserDataEnvironment: fake_rougail_config = {'step.user_data': 'environment', @@ -51,6 +52,7 @@ def _main(): short_name_max_len=2, ) parser.parse_args() + cmd_config.property.setdefault(origin_prop, 'read_write', 'append') cmd_config.property.remove("not_for_commandline") cmd_config.property.read_only() try: