justinmayer / virtualfish

Fish shell tool for managing Python virtual environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support mise as Python provider

jnk22 opened this issue · comments

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.
  • I am willing to lend a hand to help implement this feature.

Feature Request

Hi @justinmayer, first of all, thanks for your great plugin!

I have been using virtualfish with asdf for quite a while, but recently replaced that with mise.

mise is more-or-less a drop-in replacement for asdf, but unfortunately just aliasing it does not seem to work as mise plugin list does not output Python as a plugin, as that one is "built-in":

mise plugin list
haskell
usage

Trying to add the Python feature does not work, as it is built-in already:

mise plugins add python
mise python is a core plugin and does not need to be installed
mise Run with --verbose or MISE_VERBOSE=1 for more information

As virtualfish checks for Python being in the output of asdf plugin list, this does not work:

set -l asdf_plugins (asdf plugin list)
if contains python $asdf_plugins
    ...
end

Are you interested in supporting mise with virtualfish?


I currently see three possibilities to allow using virtualfish with mise:

  1. Implement direct support for mise the same way other tools are supported (preferred), or
  2. Require users to alias mise with asdf such as alias asdf="mise" and change the behavior of requiring Python to be installed as a plugin (untested), or
  3. Do not change anything and users could probably still alias mise with asdf, but need to use a wrapper around mise|asdf plugin list to also include Python (untested)

I guess all approaches have its pros and cons that I would be happy to discuss further if you are interested.

I have already implemented the first approach as jnk22/virtualfish at feat-support-mise.
This probably lacks the extended coloring support for the command vf ls --details, and potentially others that I am currently not aware of.
Also, direct support for mise should be extended with mise-specific configuration files such as ~/.mise.toml.

Either way, I would be happy to implement missing features if you want to support mise in the future.