jorgebucaran / fisher

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

Unending loop when trying to automatically install fisher. #644

Closed Jomik closed 3 years ago

Jomik commented 3 years ago

I had an auto install snippet in my config.fish

if not functions -q fisher
    curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
    fish -c fisher
end

Trying to use the install method, breaks, as it will never see that fisher exists in functions.

if not functions -q fisher
    curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
end

Is there a nice way to automate this?

jorgebucaran commented 3 years ago

Do it only if you're interactive.

if status is-interactive && ! functions --query fisher
    curl --silent --location https://git.io/fisher | source && fisher install jorgebucaran/fisher
end
Jomik commented 3 years ago

Of course! Thank you 👍