{"record":{"id":"6eb6c7703150568b","repo":"kovidgoyal/kitty","slug":"invalid-change-font-size-specification-rest-tr","errorCode":null,"errorMessage":"Invalid change_font_size specification: {rest}, treating it as default","messagePattern":"Invalid change_font_size specification: (.+?), treating it as default","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":238,"sourceCode":"def signal_child_parse(func: str, rest: str) -> FuncArgsType:\n    import signal\n\n    signals = []\n    for q in rest.split():\n        try:\n            signum = getattr(signal, q.upper())\n        except AttributeError:\n            log_error(f'Unknown signal: {rest} ignoring')\n        else:\n            signals.append(signum)\n    return func, tuple(signals)\n\n\n@func_with_args('change_font_size')\ndef parse_change_font_size(func: str, rest: str) -> tuple[str, tuple[bool, str | None, float]]:\n    vals = rest.strip().split(maxsplit=1)\n    if len(vals) != 2:\n        log_error(f'Invalid change_font_size specification: {rest}, treating it as default')\n        return func, (True, None, 0)\n    c_all = vals[0].lower() == 'all'\n    sign: str | None = None\n    amt = vals[1]\n    if amt[0] in '+-*/':\n        sign = amt[0]\n        amt = amt[1:]\n    return func, (c_all, sign, float(amt.strip()))\n\n\n@func_with_args('clear_terminal')\ndef clear_terminal(func: str, rest: str) -> FuncArgsType:\n    vals = rest.strip().split(maxsplit=1)\n    if len(vals) != 2:\n        log_error('clear_terminal needs two arguments, using defaults')\n        args = ['reset', True]\n    else:\n        action = vals[0].lower()","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L220-L256","documentation":"The change_font_size map action requires two parts: a scope token ('all' or 'local') and an amount. When the argument string doesn't split into exactly two parts, kitty logs this and falls back to the default (True, None, 0), meaning the action effectively does nothing useful.","triggerScenarios":"`map f1 change_font_size all` (only one token) or extra/malformed arguments such as `map f1 change_font_size +2 extra`. The parser does rest.strip().split(maxsplit=1) and expects len == 2.","commonSituations":"Forgetting the +/- prefix or scope in kitty.conf, e.g. writing `change_font_size +2` without 'all'/'local'.","solutions":["Use the full form: change_font_size <all|local> <[+|-|*|/]number>, e.g. `map f1 change_font_size all +2`","Check for stray extra tokens after the amount"],"exampleFix":"# before\nmap f1 change_font_size +2\n# after\nmap f1 change_font_size all +2","handlingStrategy":"validation","validationCode":"import shlex\nrest = 'all +2'\nok = len(rest.strip().split(maxsplit=1)) == 2 and rest.strip().split(maxsplit=1)[1][0] in '+-*/'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write change_font_size as scope + signed/operated amount","Test config changes with `kitty --debug-config` or by reloading and watching stderr"],"tags":["kitty","config","font-size","parser"],"backgroundTag":"invalid-config-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}