Fisher: Unending loop when trying to automatically install fisher.

Created on 7 Jan 2021  ·  2Comments  ·  Source: jorgebucaran/fisher

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?

Most helpful comment

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

All 2 comments

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

Of course! Thank you 👍

Was this page helpful?
0 / 5 - 0 ratings