Closed taranlu-houzz closed 8 months ago
just for transparency sake: I don't have the bandwidth to look into alternative shells (meaning: not bash, zsh, or fish). I'd happily accept a PR if someone can look into this or describe what needs to happen. It may be worth documenting this as these shells being "tier 2" or something.
In bash/zsh/fish the way this works is that rtx
is created as a bash function. In the case of shell and deactivate, it eval's the result of rtx shell
:
That logic needs to be ported to xonsh—or something that functions similarly.
@jdxcode No worries! Thanks for the quick response. I also doubt that I will have time to look submit a PR, especially since the work-around is to just drop to a sub-shell. Perhaps a note could be added to the documentation noting that there is a limitation when using xonsh
?
yeah I should clarify the support tier and document this
While I'm not a rust programmer, after combing through the code and experimenting a bit I found that most of what is needed to do this is indeed already present. Only the setting of the MISE_SOMETOOL_VERSION
environment variables were missing.
Porting the shell function to xonsh seemed indeed the easiest way to accomplish that, PR is here: https://github.com/jdx/mise/pull/1801
I hope I did everything right, esp. regarding the insta snapshots.
Describe the bug When I try to use
rtx shell python@3.10
while running underxonsh
, it appears that it is unable to set the Python version correctly (seems like it just doesn't work):When I drop to a sub-shell using
fish
and try it again, it works just fine:To Reproduce Try to use
rtx shell
while running underxonsh
.Expected behavior Same behavior as when using other shells like
fish
.rtx doctor
outputAdditional context I am running
xonsh
in azellij
session.