From 38f1fe77427c2fb484a91082d8bd03275b3c7c8a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 18 Oct 2021 22:39:44 +0530 Subject: [PATCH] Make --override parsing a little more forgiving Handle option values with = in them even if the user uses a space as a separator rather than an = --- kitty/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/cli.py b/kitty/cli.py index baede09c5..ab5f2d1b5 100644 --- a/kitty/cli.py +++ b/kitty/cli.py @@ -770,7 +770,8 @@ SYSTEM_CONF = '/etc/xdg/kitty/kitty.conf' def create_opts(args: CLIOptions, accumulate_bad_lines: Optional[List[BadLineType]] = None) -> KittyOpts: from .config import load_config config = tuple(resolve_config(SYSTEM_CONF, defconf, args.config)) - overrides = (a.replace('=', ' ', 1) for a in args.override or ()) + pat = re.compile(r'^([a-zA-Z0-9_ ]+)=') + overrides = (pat.sub(r'\1 ', a) for a in args.override or ()) opts = load_config(*config, overrides=overrides, accumulate_bad_lines=accumulate_bad_lines) return opts