{"record":{"id":"24668323fbc1d5d1","repo":"kovidgoyal/kitty","slug":"invalid-shell-integration-options-q-allowed-sh","errorCode":null,"errorMessage":"Invalid shell integration options: {q - allowed_shell_integration_values}, ignoring","messagePattern":"Invalid shell integration options: (.+?), ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":1172,"sourceCode":"        start = 1\n        idx = parts[1].find('\"', 1)\n        if idx == -1:\n            raise ValueError(f'The menu entry name in {val} must end with a double quote')\n    else:\n        idx = parts[1].find(' ')\n        if idx == -1:\n            raise ValueError(f'The menu entry {val} must have an action')\n    location = ('global',) + tuple(parts[1][start:idx].split('::'))\n    yield location, parts[1][idx + 1 :].lstrip()\n\n\nallowed_shell_integration_values = frozenset({'enabled', 'disabled', 'no-rc', 'no-cursor', 'no-title', 'no-prompt-mark', 'no-complete', 'no-cwd', 'no-sudo'})\n\n\ndef shell_integration(x: str) -> frozenset[str]:\n    q = frozenset(x.lower().split())\n    if not q.issubset(allowed_shell_integration_values):\n        log_error(f'Invalid shell integration options: {q - allowed_shell_integration_values}, ignoring')\n        return q & allowed_shell_integration_values or frozenset({'invalid'})\n    return q\n\n\ndef confirm_close(x: str) -> tuple[int, bool]:\n    parts = x.split(maxsplit=1)\n    num = int(parts[0])\n    allow_background = len(parts) > 1 and parts[1] == 'count-background'\n    return num, allow_background\n\n\ndef underline_exclusion(x: str) -> tuple[float, Literal['', 'px', 'pt']]:\n    try:\n        return float(x), ''\n    except Exception:\n        unit: Literal['pt', 'px'] = x[-2:]  # type: ignore\n        if unit not in ('px', 'pt'):\n            raise ValueError(f'Invalid underline_exclusion with unrecognized unit: {x}')","sourceCodeStart":1154,"sourceCodeEnd":1190,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1154-L1190","documentation":"shell_integration takes space-separated values from a fixed set (enabled, disabled, no-rc, no-cursor, no-title, no-prompt-mark, no-complete, no-cwd, no-sudo). Unknown tokens are reported, discarded, and if nothing valid remains the value becomes {'invalid'}.","triggerScenarios":"shell_integration no-something (typo), e.g. 'no-tilte', or an unsupported token like 'sudo'.","commonSituations":"Typos in flags; flags from newer kitty versions used on older installs; misunderstanding that it is a space-separated list of flags, not free-form.","solutions":["Use only supported tokens: enabled disabled no-rc no-cursor no-title no-prompt-mark no-complete no-cwd no-sudo.","Fix typos like no-tilte -> no-title.","Upgrade kitty if the flag was added in a newer release."],"exampleFix":"# before\nshell_integration no-tilte\n\n# after\nshell_integration no-title","handlingStrategy":"validation","validationCode":"ALLOWED = {'enabled','disabled','no-rc','no-cursor','no-title','no-prompt-mark','no-complete','no-cwd','no-sudo'}\ndef valid_shell_integration(x: str) -> bool:\n    return set(x.lower().split()).issubset(ALLOWED)","typeGuard":"def is_shell_integration_tokens(x: str) -> bool:\n    return set(x.lower().split()) <= {'enabled','disabled','no-rc','no-cursor','no-title','no-prompt-mark','no-complete','no-cwd','no-sudo'}","tryCatchPattern":null,"preventionTips":["Copy the exact flag list from docs for your kitty version","Spell flags exactly (no-title, not no-tilte)"],"tags":["kitty","config","shell-integration"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}