Closed tsdh closed 1 year ago
You are absolutely right. Solution: run this code only if interactive:
if status is-interactive
functions --query fisher || curl -sL git.io/fisher | source && fisher install jorgebucaran/fisher
end
Your snippet installs fisher every time I start a new fish shell because:
❯ true || echo "false" && echo "done"
done
~
❯ false || echo "false" && echo "done"
false
done
That seemed very surprising to me but bash and zsh agree that's the way it's supposed to be.
I'm now using this which works:
if status is-interactive && ! functions --query fisher
curl -sL git.io/fisher | source \
&& fisher install jorgebucaran/fisher
end
But I wonder how my original snippet worked for years throughout many fish updates...
Anyway, problem solved.
Ahhhh, I stand corrected! 😅
Yep, I'm glad you got it working.
First of all, thanks a lot for fisher. I'm using it for years. :-)
Today I've updated fish from 3.4.1 to 3.5.1. I have a
~/.config/fish/conf.d/01_fisher.fish
with these contents:I don't know why during after the update, the
fisher
function wasn't defined but firing up a newfish
dropped that into afisher install
infloop. I guess thecurl ... | source && fisher install ...
line invokesfish
again which causes01_fisher.fish
to be run again and so forth. Well, but why isfunctions -q fisher
true on the second run? I have no clue but asked on#fish@oftc
and report back when I got a reply as to what change in fish might cause that behavior.