I’m having a weird lil problem with Fish shell. I’ve just finished to write a little script to use with my Waybar config. The script is located at ~/.config/fish/functions/the-script.fish
and have inside it multiples functions.
When I’m calling the script directly from my Fish shell, the script works perfectly. But if I call the script with fish -c the-script.fish
(which is what I’m basically doing with Waybar), the script throw stupid errors like “Uhh command what (when calling a function)? None of theses words are in the bible.”
And I don’t get why Fish behaves so differently depending on how I call the script 
RT appreciated
(The script I’m talking about as reply bellow)
Edit: Nevermind, I figured out what I was doing wrong. The problem was that I tried to make local functions nested inside the script’s main function. Apparently that wasn’t the right thing to do with Fish. Moving theses functions outside function niri-color-scheme
‘s scope did make the script works like intended.