From f3a68740d1386bcc13171eb3f651da22282f5b38 Mon Sep 17 00:00:00 2001 From: Guy Salton Date: Sat, 8 Jul 2023 01:32:47 +0300 Subject: [PATCH] utils/shell: add support for `vox` in `xonsh` shell --- src/poetry/utils/shell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/poetry/utils/shell.py b/src/poetry/utils/shell.py index d60998f0b0e..909915438cc 100644 --- a/src/poetry/utils/shell.py +++ b/src/poetry/utils/shell.py @@ -105,7 +105,9 @@ def activate(self, env: VirtualEnv) -> int | None: if self._name in ["zsh", "nu"]: c.setecho(False) - if self._name == "zsh": + if self._name == "xonsh": + c.sendline(f"vox activate {shlex.quote(str(env.path))}") + elif self._name == "zsh": # Under ZSH the source command should be invoked in zsh's bash emulator c.sendline(f"emulate bash -c '. {shlex.quote(str(activate_path))}'") else: