News for hackers. Stuff that matters.
Re:s/bash/zsh/g by digitalsushi on Wednesday October 20, 2021 @04:53PM (#28936413)
It's as simple and seductive as Ruby on Rails was 20 years ago.
Re:s/bash/zsh/g by forgetfulness on Wednesday October 20, 2021 @11:44PM (#28939958)
I was going to mount a defense of fish about how it doesn't provide the same mechanisms or provide the same incentives that had people contorting Ruby into the most convoluted forms on their way to spit out HTML or JSON from an HTTP request, but then I found that the thing has a `fish_command_not_found` that you can overload as in Ruby.

https://fishshell.com/docs/current/cmds/fish_command_not_fou...

So yeah you could make crazy stuff like Rail's routing and rendering DSLs that interpreted method names as programs.

Re:s/bash/zsh/g by faho on Thursday October 21, 2021 @08:42AM (#28943566)
Bash and zsh have basically the same thing.

It's meant to give you a nice error message like

"foo is missing. You can install it with 'apt install foo123'"

See:

- https://zsh.sourceforge.io/Doc/Release/Command-Execution.htm... for zsh

- https://www.gnu.org/software/bash/manual/bash.html#Command-S... for bash

You could make it run arbitrary things, but then you're quite clearly misusing it and e.g. there's no way to make it return a different status, fish will still view the command as failed.