Skip to content

mise rm #1465

Closed
Closed
@jdx

Description

right now mise rm|remove is an alias for mise uninstall, however I am wondering if that should stay the case. I am considering whether it should have slightly different behavior where instead of just uninstalling a tool, it would also modify the config file to no longer reference the installed tool. Basically the inverse of mise use.

New users—notably this is a problem specific to those not coming from asdf—are becoming confused why they can't "completely remove" something. What they do is something like this:

$ mise use -g node@20
$ mise uninstall node
$ mise ls
node 20.0.0 (missing)

node shows up as v20 with a "missing" tag on it but they just uninstalled it.

Now for asdf users, they don't struggle here. They know that mise install|uninstall do not touch config files but mise global|local do. It wouldn't make sense for mise uninstall to have done that.

This was introduced when I created mise use which doesn't have a discoverable inverse command. To illustrate, the matrix of commands looks like this:

add remove
does not modify config mise install mise uninstall
does modify config mise use mise ???

Although, technically that isn't quite true, there are 2 commands for this task:

  • mise global|local --rm
  • mise use --rm

But they both have problems. First, global|local is something I actually push users away from for DX reasons. It's asdf legacy support. mise use is almost always a better option. mise use --rm isn't great though because it just sounds weird and users wouldn't think to look under mise use for removing something from config.

I think what would make sense is a new command: mise rm. However, I really dislike introducing yet another command that's only slightly different. I worry about confusion between mise uninstall and mise remove. Perhaps in the beginning it would've made sense to completely break away from asdf's convention and only have mise install|uninstall and have both of them modify config files unless some flag was passed, but I'm not sure.

I'm leaning towards thinking we should add it. I think my table above illustrates that it's a fairly clear gap. However I tried to think the logic for that command through and it's actually quite complicated. What if something is defined in multiple config files? Do you need to specify mise rm --global if it's only in the global config? Lots of outstanding questions.

Perhaps to avoid confusion I could call it the awkward—but more clear—mise unuse.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions