jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.53k stars 257 forks source link

Manually source plugins #785

Closed BoManev closed 4 months ago

BoManev commented 4 months ago

Fisher is great! I have been using it for more than an year, without any issues.

I installed https://github.com/lilyball/nix-env.fish, however I noticed an issue. In my fish config, I completely overwrite the default PATH.

set PATH /usr/local/sbin/
set PATH $PATH ...

However, this breaks the nix-env plugin, because my config overwrites the PATH set by the plugin. If I don't overwrite the PATH in my config, everything works as expected.

Is there any way to tell fisher, when to source/initialize the plugins? Essentially, I want to do some setup in my config and at some point invoke fisher to source the plugins.

Thank you!

jorgebucaran commented 4 months ago

Could you use fish_add_path to interactively set your PATH? This way, you wouldn't need to directly modify the PATH in your config.fish.

BoManev commented 4 months ago

I would prefer something more 'declarative'. One of the reasons I'm overwriting the "default" PATH is to remove the snap/bin. I can think of couple of solutions: