{"record":{"id":"399745fd853ac630","repo":"kovidgoyal/kitty","slug":"strategy-is-not-a-valid-disable-ligatures-strate","errorCode":null,"errorMessage":"{strategy} is not a valid disable ligatures strategy","messagePattern":"(.+?) is not a valid disable ligatures strategy","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":412,"sourceCode":"    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\n        if not parts or len(parts) % 2 != 0:\n            raise ValueError('Mark group number and text/regex are not specified in pairs: {}'.format(' '.join(parts)))","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L394-L430","documentation":"disable_ligatures_in validates the strategy (second token, or first when only one is given) against never, always, cursor. Anything else raises ValueError naming the invalid strategy.","triggerScenarios":"`disable_ligatures all sometimes`, `disable_ligatures off`, or `disable_ligatures active on` — the strategy token is not one of never/always/cursor.","commonSituations":"Boolean-style values (on/off); misspelling 'cursor'; older kitty versions had different strategy names so shared dotfiles break on upgrade.","solutions":["Use never, always, or cursor as the strategy","Remember order: where (optional) then strategy","Fix typos like 'curser'"],"exampleFix":"# before\ndisable_ligatures all on\n# after\ndisable_ligatures all always","handlingStrategy":"validation","validationCode":"parts = rest.split(maxsplit=1)\nwhere, strategy = ('active', parts[0]) if len(parts) == 1 else parts\nif strategy not in ('never','always','cursor'):\n    raise SystemExit(f'bad strategy: {strategy}')","typeGuard":"def is_ligature_strategy(v: str) -> bool:\n    return v in ('never','always','cursor')","tryCatchPattern":null,"preventionTips":["Strategies are keywords, not booleans","Order arguments [where] strategy"],"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"}