Skip to content

Commit

Permalink
utils/shell: add support for vox in xonsh shell
Browse files Browse the repository at this point in the history
  • Loading branch information
guysalt committed Jul 17, 2023
1 parent 01657dd commit f3a6874
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/poetry/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f3a6874

Please sign in to comment.