mise icon indicating copy to clipboard operation
mise copied to clipboard

`mise shell --unset` should not need currently the currently set version number

Open yggdr opened this issue 1 year ago • 2 comments

Currently, I need to mise shell -u [email protected] to remove it from my $PATH, when a simple mise shell -u python should suffice, as the version can be deduced.

yggdr avatar Apr 06 '24 15:04 yggdr

I haven't looked at the code for this in a while but I suspect the reason for this is if you have multiple versions specified it wouldn't be able to know which one to remove. Of course, we could just have logic for that that simply removes if there is only one version specified.

jdx avatar Apr 06 '24 16:04 jdx

How can you have multiple versions specified per environment variables? If I mise shell [email protected] it overwrites the previously set mise shell [email protected]. In fact, it now seems to me that mise completely ignores the version given, I can mise shell python@$V1 and then mise shell -u python@$ANY_OTHER_VALID_VERSION. So long as the underlying python-build script knows the version, it works in deactivating it. Why python-build is even involve in mise shell -u is however a mystery to me.

yggdr avatar Apr 06 '24 18:04 yggdr