

I have fish set as the default command to run when my terminal emulator starts, but my system-wide default shell is bash and I always throw a or shebang at the top of my scripts either way.
With that setup, I hardly notice fish’s syntax differences. Are you using it like that, too?




















That is definitely not right. That sounds like you don’t have a shebang or it isn’t defined correctly. The shebang has to be the very first thing in the script, with no whitespace before it. It gets read out by the kernel, which very dumbly checks the first few bytes.
And well, such a shebang should also work for Python or the like. If you copy the first script in this link into a file
script.py, then runchmod +x script.pyand finally run./script.py, does that printHello, World!?