mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
Add a zsh test for clone env serialization
This commit is contained in:
@@ -71,6 +71,8 @@ class Callbacks:
|
||||
self.open_urls = []
|
||||
self.cc_buf = []
|
||||
self.bell_count = 0
|
||||
self.clone_cmds = []
|
||||
self.current_clone_data = ''
|
||||
|
||||
def on_bell(self) -> None:
|
||||
self.bell_count += 1
|
||||
@@ -94,6 +96,19 @@ class Callbacks:
|
||||
text = process_remote_print(msg)
|
||||
print(text, file=sys.__stderr__)
|
||||
|
||||
def handle_remote_clone(self, msg):
|
||||
if not msg:
|
||||
if self.current_clone_data:
|
||||
cdata, self.current_clone_data = self.current_clone_data, ''
|
||||
from kitty.launch import CloneCmd
|
||||
self.clone_cmds.append(CloneCmd(cdata))
|
||||
self.current_clone_data = ''
|
||||
return
|
||||
num, rest = msg.split(':', 1)
|
||||
if num == '0' or len(self.current_clone_data) > 1024 * 1024:
|
||||
self.current_clone_data = ''
|
||||
self.current_clone_data += rest
|
||||
|
||||
def handle_remote_ssh(self, msg):
|
||||
from kittens.ssh.main import get_ssh_data
|
||||
if self.pty:
|
||||
|
||||
Reference in New Issue
Block a user