mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Have *_with_cwd work with the ssh kitten to open new windows auto-logged into the remote server at the current remote working directory
This commit is contained in:
@@ -936,3 +936,12 @@ def cleanup_ssh_control_masters() -> None:
|
||||
for x in files:
|
||||
with suppress(OSError):
|
||||
os.remove(x)
|
||||
|
||||
|
||||
def path_from_osc7_url(url: str) -> str:
|
||||
if url.startswith('kitty-shell-cwd://'):
|
||||
return '/' + url.split('/', 3)[-1]
|
||||
if url.startswith('file://'):
|
||||
from urllib.parse import urlparse
|
||||
return urlparse(url).path
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user