mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
query_terminal: Add support for reporting name of the OS the terminal emulator is running on
Fixes #8201
This commit is contained in:
@@ -14,6 +14,7 @@ from typing import (
|
||||
Iterable,
|
||||
Iterator,
|
||||
List,
|
||||
Literal,
|
||||
NamedTuple,
|
||||
Optional,
|
||||
Sequence,
|
||||
@@ -178,7 +179,7 @@ currently_parsing = CurrentlyParsing()
|
||||
|
||||
|
||||
@run_once
|
||||
def os_name() -> str:
|
||||
def os_name() -> Literal['macos', 'bsd', 'linux', 'unknown']:
|
||||
if is_macos:
|
||||
return 'macos'
|
||||
if 'bsd' in _plat:
|
||||
|
||||
Reference in New Issue
Block a user