Handle argv[0] being buggered on macOS
This commit is contained in:
parent
4cf54d2dfb
commit
0fcfe104e3
@ -283,8 +283,8 @@ class Child:
|
||||
# xterm, urxvt, konsole and gnome-terminal do not do it in my
|
||||
# testing.
|
||||
argv[0] = (f'-{exe.split("/")[-1]}')
|
||||
exe = which(exe) or exe
|
||||
pid = fast_data_types.spawn(exe, self.cwd, tuple(argv), env, master, slave, stdin_read_fd, stdin_write_fd, ready_read_fd, ready_write_fd)
|
||||
self.final_exe = which(exe) or exe
|
||||
pid = fast_data_types.spawn(self.final_exe, self.cwd, tuple(argv), env, master, slave, stdin_read_fd, stdin_write_fd, ready_read_fd, ready_write_fd)
|
||||
os.close(slave)
|
||||
self.pid = pid
|
||||
self.child_fd = master
|
||||
|
||||
@ -547,6 +547,8 @@ def clone_and_launch(msg: str, window: Window) -> None:
|
||||
cmdline = []
|
||||
if not cmdline:
|
||||
cmdline = list(window.child.argv)
|
||||
if cmdline and cmdline[0] == window.child.argv[0]:
|
||||
cmdline[0] = window.child.final_exe
|
||||
ssh_kitten_cmdline = window.ssh_kitten_cmdline()
|
||||
if ssh_kitten_cmdline:
|
||||
from kittens.ssh.main import set_cwd_in_cmdline, set_env_in_cmdline
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user