Add explicit support for python and conda venvs to clone-in-kitty

Still needs to be implemented for fish
This commit is contained in:
Kovid Goyal
2022-04-16 13:15:10 +05:30
parent d6c5b40ead
commit 1daf745d74
3 changed files with 63 additions and 0 deletions

View File

@@ -562,6 +562,9 @@ class CloneCmd:
if k == 'pid':
self.pid = int(v)
continue
if k == 'envfmt':
self.envfmt = v
continue
v = base64.standard_b64decode(v).decode('utf-8', 'replace')
if k == 'a':
self.args.append(v)
@@ -589,6 +592,8 @@ def clone_and_launch(msg: str, window: Window) -> None:
c.opts.cwd = c.cwd
c.opts.copy_colors = True
c.opts.copy_env = False
c.opts.env = list(c.opts.env) + ['KITTY_IS_CLONE_LAUNCH=1']
cmdline = c.cmdline
if c.pid > -1:
try:
cmdline = cmdline_of_process(c.pid)