Closed ruben-arts closed 8 months ago
Yep, I totally agree with this, I think this is super useful! For me, this does not work in Zsh on an Mac M1, as can be seen in this screenshot.
Also, I'm wondering why it's possible to activate the shell with micromaba and conda, as can also be seen in the screenshot.
With that approach, I however get the full path (/Users/jan-hendrik/projects/trying-pixi/.pixi/env)
, where it would be nice to only get the relative path (.pixi/env)
Made with
which python
pixi shell
which python
exit
conda activate .pixi/env
which python
conda deactivate
micromamba activate .pixi/env
which python
micromamba deactivate
Just to be sure I added a note in this issue, that you need to add the pixi completion
to your rc files. Are you @traversaro @kolibril13 both running that resulting script before you run pixi shell
?
This is my result using v0.2.0
:
[rarts@fedora test]$ pixi shell
(test) [rarts@fedora test]$ exit
exit
[rarts@fedora test]$
@kolibril13 The fact that all tools can activate the environment is because we all implement the "conda spec" so its "just" a conda environment. pixi does nothing special to those environments. The magic is in the interaction with those environments. The default behaviour of the conda environments is to use the "name" or the path but since we don't store a global list of names for the environments we can't use the same logic that conda uses to get the name in the prompt.
Just to be sure I added a note in this issue, that you need to add the
pixi completion
to your rc files. Are you @traversaro @kolibril13 both running that resulting script before you runpixi shell
?
I was not, indeed after doing that the feature is working for me, thanks!
This has been fixed in #385
When moving into a
pixi shell
it can be convenient to see that the shell is active.NOTE: to get this to work you have to run
pixi completion
in your shells activation script, e.g..bashrc
or.zshrc
. There are examples in the docs