Open Techcable opened 2 years ago
This is especially true in my case because I use zsh2xonsh already in my .xonshrc 😉. Maybe we could use --no-rc and scrub the environment variables back to the original?
Why does this make it more difficult? I am probs being dumb, but I am not following.
This is hard (not just because I'm lazy), but also because we often want to execute the translated commands under a "clean" xonsh environment and not just verify they parse.....
However, getting a clean
xonsh
environment for testing would be difficult, because we're often running underxonsh
or with an already modified $PATH.This is especially true in my case because I use zsh2xonsh already in my
.xonshrc
😉. Maybe we could use--no-rc
and scrub the environment variables back to the original?Alternatively, maybe we can spawn up
zsh -f -c 'echo $PATH'
to get a semi-clean path (or xonsh--no-rc
)? We have to be careful not to inherit any environment variables besides the default one.EDIT:
xonsh --no-rc
seems to work well using the following command.I suggest we use this to bootstrap $PATH and $PYTHON_PATH, wiping other non-essential environment vars :)
This should give us a somewhat clean slate (while also respecting homebrew python).