kovidgoyal/kitty · error · ValueError
Unknown menu type: {parts[0]}. Known types: global
Error message
Unknown menu type: {parts[0]}. Known types: global What it means
menu_map requires the first token to be the menu type; currently only 'global' is supported. Any other first token raises this error listing known types.
Source
Thrown at kitty/options/utils.py:1151
if v:
v = expandvars(v, current_val)
yield key, v
else:
yield val, DELETE_ENV_VAR
def store_multiple(val: str, current_val: Container[str]) -> Iterable[tuple[str, str]]:
val = val.strip()
if val not in current_val:
yield val, val
def menu_map(val: str, current_val: Container[str]) -> Iterable[tuple[tuple[str, ...], str]]:
parts = val.split(maxsplit=1)
if len(parts) != 2:
raise ValueError(f'Ignoring invalid menu action: {val}')
if parts[0] != 'global':
raise ValueError(f'Unknown menu type: {parts[0]}. Known types: global')
start = 0
if parts[1].startswith('"'):
start = 1
idx = parts[1].find('"', 1)
if idx == -1:
raise ValueError(f'The menu entry name in {val} must end with a double quote')
else:
idx = parts[1].find(' ')
if idx == -1:
raise ValueError(f'The menu entry {val} must have an action')
location = ('global',) + tuple(parts[1][start:idx].split('::'))
yield location, parts[1][idx + 1 :].lstrip()
allowed_shell_integration_values = frozenset({'enabled', 'disabled', 'no-rc', 'no-cursor', 'no-title', 'no-prompt-mark', 'no-complete', 'no-cwd', 'no-sudo'})
def shell_integration(x: str) -> frozenset[str]:View on GitHub (pinned to 6d5d0c4406)
Solutions
- Use 'global' as the menu type
- Remove unsupported menu lines until kitty supports other scopes
Example fix
# before menu main "Item" launch nvim # after menu global "Item" launch nvim
Defensive patterns
Strategy: type-guard
Type guard
def is_menu_type(t: str) -> bool:
return t == 'global' Prevention
- Only 'global' menus exist; parameterize your generator accordingly
When it happens
Trigger: menu main ... or menu tab ... — any type other than global.
Common situations: Expecting per-tab or per-window menus that kitty does not (yet) support; guessing type names.
Related errors
- Ignoring invalid menu action: {val}
- The menu entry name in {val} must end with a double quote
- This should be run as kitten broadcast
- No option named: {k}
- No custom kitten named {kitten} found
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/4b6b0caa060a6170.
Report an issue: GitHub.