[options] add '--config-type' command-line option

can also be set via 'GDL_CONFIG_TYPE' environment variable
9fd732afe8
This commit is contained in:
Mike Fährmann
2026-02-07 21:40:30 +01:00
parent 8eafa1564a
commit 56f2790626
4 changed files with 63 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2025 Mike Fährmann
# Copyright 2017-2026 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -633,6 +633,12 @@ def build_parser():
dest="config", action="store_const", const="open",
help="Open configuration file in external application",
)
configuration.add_argument(
"--config-type",
dest="config_type", metavar="TYPE",
help=("Set filetype of default configuration files "
"(json, yaml, toml)"),
)
configuration.add_argument(
"--config-ignore",
dest="config_load", action="store_false",