News for hackers. Stuff that matters.
Re:Why Create a New Unix Shell? by hrktb on Wednesday January 31, 2018 @04:24PM (#16277687)
One of the werid cases with fish as default shell is scripts and programs that expect bash when executing “system” commands. For instance a php or Java program running shell commands.

Having bash compatibility is a quality of life feature, no need to debug all the werid cases where it breaks for purely syntax reasons.

Re:Why Create a New Unix Shell? by chubot on Wednesday January 31, 2018 @05:21PM (#16278085)
Right, the system() function in C, which PHP probably uses, and is os.system() in Python, is DEFINED to run /bin/sh. You never know when a program might call it (although I agree it is almost always bad practice to use it -- use fork/exec instead.)

So basically you should never make /bin/sh fish, because then you will no longer have a Unix system (according to POSIX).

Re:Why Create a New Unix Shell? by aspaceman on Saturday February 03, 2018 @05:25PM (#16300035)
Not sure I understand what you mean. /bin/sh is the system shell, I don't believe it's possible to make it fish unless you change the symlink itself.

On ubuntu, /bin/sh is always dash and it's not possible to change without changing the symlink:

https://wiki.ubuntu.com/DashAsBinSh

So, if you use chsh to make your shell fish, it would have no effect on os.system or the system function in C.

Re:Why Create a New Unix Shell? by hrktb on Wednesday January 31, 2018 @07:05PM (#16278711)
PHP somewhat takes the user’s login shell, so I guess it’s yet a different system. If it was taking /bin/sh it would have been fine actually.
Re:Why Create a New Unix Shell? by TylerE on Wednesday January 31, 2018 @08:45PM (#16279145)
Don't blame the rest of the world for PHP's brain damage.
Re:Why Create a New Unix Shell? by djsumdog on Wednesday January 31, 2018 @04:40PM (#16277772)
That's just lazy programming, and if anything, we should have more incompatible shells so that developers will start to write their programs to stop shelling out and run individual programs, or if they do shell out, actually declare the shell you're using at that point and don't assume it will be sh compatible.
Re:Why Create a New Unix Shell? by Symmetry on Wednesday January 31, 2018 @05:05PM (#16277974)
Personally I leave bash as my login shell and just set my terminal emulator to launch fish on startup.