IlanCosman / scuba

🤿 Minimal plugin manager for the friendly interactive shell
MIT License
18 stars 0 forks source link

Report which file conflicts #1

Open PatrickF1 opened 3 years ago

PatrickF1 commented 3 years ago

It would be very nice if scuba reported which file(s) conflicts when it outputs the plugin conflict warning.

Btw, I realized a bunch of OMF plugins may conflict because they all have uninstall.fish.

IlanCosman commented 3 years ago

Adding files that conflict should be easy. That's a good point about OMF though. I suppose generally uninstall.fish is going to be an issue, just like it is right now with fzf.fish. I guess I'll just have scuba ignore uninstall.fish.

IlanCosman commented 3 years ago

Scuba now ignores uninstall.fish, so that part of the issue is gone, but the rest requires a bit more care. I'd wager that 95% of the time that someone runs into the warning, it's going to be either installing a different version of the same plugin, or a different theme when they already have one.

In neither of these cases is the list of file conflicts very useful. For the former, it will spam your terminal with presumably every file in the plugin. For the latter, it will list the expected fish_prompt, and perhaps some other things like fish_right_prompt, or fish_mode_prompt.

I'm not really sure where a file conflict list is actually useful. If you press y, I expect you to know what you're doing. Otherwise, you should remove the conflicting plugin beforehand.

Thoughts?

PatrickF1 commented 3 years ago

Good thinking and user focus. However, I'd actually wager the opposite--most users would know not to install two of the same themes or two of the same plugin so most of the time, it's that they are installing two plugins that conflict inexplicably. Anyway, shouldn't it be easy to distinguish those two cases?