{"record":{"id":"9ae90eaf2e2a5a78","repo":"kovidgoyal/kitty","slug":"where-is-not-a-valid-set-of-windows-to-disable-l","errorCode":null,"errorMessage":"{where} is not a valid set of windows to disable ligatures in","messagePattern":"(.+?) is not a valid set of windows to disable ligatures in","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":410,"sourceCode":"@func_with_args('sleep')\ndef sleep(func: str, sleep_time: str) -> FuncArgsType:\n    mult = 1\n    sleep_time = sleep_time or '1'\n    if sleep_time[-1] in 'shmd':\n        mult = {'s': 1, 'm': 60, 'h': 3600, 'd': 24 * 3600}[sleep_time[-1]]\n        sleep_time = sleep_time[:-1]\n    return func, [abs(float(sleep_time)) * mult]\n\n\n@func_with_args('disable_ligatures_in')\ndef disable_ligatures_in(func: str, rest: str) -> FuncArgsType:\n    parts = rest.split(maxsplit=1)\n    if len(parts) == 1:\n        where, strategy = 'active', parts[0]\n    else:\n        where, strategy = parts\n    if where not in ('active', 'all', 'tab'):\n        raise ValueError(f'{where} is not a valid set of windows to disable ligatures in')\n    if strategy not in ('never', 'always', 'cursor'):\n        raise ValueError(f'{strategy} is not a valid disable ligatures strategy')\n    return func, [where, strategy]\n\n\n@func_with_args('layout_action')\ndef layout_action(func: str, rest: str) -> FuncArgsType:\n    parts = rest.split(maxsplit=1)\n    if not parts:\n        raise ValueError('layout_action must have at least one argument')\n    return func, [parts[0], tuple(parts[1:])]\n\n\ndef parse_marker_spec(ftype: str, parts: Sequence[str]) -> tuple[str, str | tuple[tuple[int, str], ...], int]:\n    flags = re.UNICODE\n    if ftype in ('text', 'itext', 'regex', 'iregex'):\n        if ftype.startswith('i'):\n            flags |= re.IGNORECASE","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L392-L428","documentation":"disable_ligatures_in parses the disable_ligatures action arguments as [where] strategy. where must be active, all, or tab; anything else raises ValueError. If only one word is given it defaults to where='active'.","triggerScenarios":"A map/launch line like `disable_ligatures window never` or `disable_ligatures everywhere always` — the first token is validated against ('active','all','tab').","commonSituations":"Users writing `disable_ligatures cursor` (strategy keyword first, forgetting the where token); guessing 'window' or 'everywhere' as scope names; misordered arguments.","solutions":["Put the scope first: active, all, or tab; then the strategy (never/always/cursor)","For a single-window toggle use `disable_ligatures active always` or just the strategy alone to default to active","Check argument order — two tokens means [where, strategy]"],"exampleFix":"# before\ndisable_ligatures window never\n# after\ndisable_ligatures tab never","handlingStrategy":"validation","validationCode":"parts = rest.split(maxsplit=1)\nwhere, strategy = ('active', parts[0]) if len(parts) == 1 else parts\nif where not in ('active','all','tab'):\n    raise SystemExit(f'bad where: {where}')","typeGuard":"def is_ligature_where(v: str) -> bool:\n    return v in ('active','all','tab')","tryCatchPattern":null,"preventionTips":["Scope first (active/all/tab), then strategy","A single token means strategy with where=active"],"tags":["kitty","config","ligatures","action-args"],"backgroundTag":"action-invalid-argument","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}