News for hackers. Stuff that matters.
Re:New Features in the Fish Shell by hinkley on Tuesday September 29, 2020 @03:22PM (#24631845)
It's a chronic problem on work projects that people write shell scripts without a shebang operator at the top. Obscure error messages are usually how I find out someone is using zsh, fish, or some other shell.

I fix what I can, but it's like mopping up water during a rainstorm. Yes it's better than doing nothing, but also there will be more in twenty minutes so don't make any plans.

Re:New Features in the Fish Shell by azernik on Tuesday September 29, 2020 @05:44PM (#24633388)
One way I force people (mostly myself) to include shebang lines:

Have a scripts directory in my repo that mixes shell and python scripts with no file extensions and executable bits set. If I don't put a shebang, it just doesn't run.

Of course, this requires you to have firm control of code style policies.

Re:New Features in the Fish Shell by kstrauser on Tuesday September 29, 2020 @07:25PM (#24634239)
Make a post-commit hook that adds "#!/usr/bin/yes No." at the top of every file missing a shebang.
Re:New Features in the Fish Shell by azernik on Tuesday September 29, 2020 @09:53PM (#24635036)
Heh.
Re:New Features in the Fish Shell by maple3142 on Tuesday September 29, 2020 @10:15PM (#24635119)
But, does shebang works when you want to source some files?
Re:New Features in the Fish Shell by masukomi on Tuesday September 29, 2020 @10:36PM (#24635190)
you can source a file that contains a shebang in most (all?) shells assuming it contains code written in the same shell language. I.e. a bash file can't source a fish file and vice-versa.
Re:New Features in the Fish Shell by hinkley on Wednesday September 30, 2020 @01:02AM (#24635836)
Don’t cross the streams.

It would be bad.