c
c copied to clipboard
Shebang don't work, on MacOS 12.6 with FishShell 3.5.1
When I use Shebang as described in README.md, I get an error.

This seems to be a compatibility issue with FishShell at the moment, as it works fine with Bash and Zsh.
I checked the source code of FishShell and I think the problem is here https://github.com/fish-shell/fish-shell/blob/master/src/exec.cpp#L177
Currently still looking for a solution
I found this. https://stackoverflow.com/a/9988385/2138221
Looks like Mac OS X requires interpreter to be binary, not another script.
I changed Shebang to #!/usr/bin/env /usr/local/bin/c temporarily solved the problem

I hope this solution can help other people like me
@leolovenet by the way, if you use /usr/bin/env in the shebang, you don't need to explicitly type the full path to /usr/local/bin/c.
If /usr/local/bin is in your PATH (and it probably is), you can use this shorter shebang:
#!/usr/bin/env c