diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 9d84b5913..622046dfb 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # License: GPL v3 Copyright: 2016, Kovid Goyal +import os import re from binascii import hexlify, unhexlify from collections.abc import Generator @@ -548,6 +549,9 @@ def result(encoded_query_name: str, x: str | Literal[True] | None = None) -> str yield result(encoded_query_name) else: yield result(encoded_query_name, rval) + elif name in ('query-os-name', 'query-os_name'): + # https://github.com/kovidgoyal/kitty/issues/9217 + yield result(encoded_query_name, os.uname().sysname) else: if name in bool_capabilities: yield result(encoded_query_name, True)