misc parser and test fixes

This commit is contained in:
Kovid Goyal
2023-10-29 14:39:36 +05:30
parent 5168e0b576
commit 52025ff030
10 changed files with 55 additions and 76 deletions

View File

@@ -1050,7 +1050,9 @@ def cleanup_ssh_control_masters() -> None:
os.remove(x)
def path_from_osc7_url(url: str) -> str:
def path_from_osc7_url(url: Union[str, bytes]) -> str:
if isinstance(url, bytes):
url = url.decode('utf-8')
if url.startswith('kitty-shell-cwd://'):
return '/' + url.split('/', 3)[-1]
if url.startswith('file://'):