diff --git a/kitty/window.py b/kitty/window.py index abc348ea6..02cc5cd4e 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -1827,7 +1827,7 @@ class Window: def child_is_remote(self) -> bool: for p in self.child.foreground_processes: q = list(p['cmdline'] or ()) - if q and q[0].lower() == 'ssh': + if q and os.path.basename(q[0]).lower() == 'ssh': return True return False