Hacker News new | ask | show | jobs
by chasil 574 days ago
Isn't zsh the current #!/bin/sh on MacOS?

Why is this written for bash, which isn't getting recent changes?

1 comments

Compatibility with older devices that aren't eligible for recent OS updates, I would assume?

Or, if the person is like me, they're more comfortable in Bash after years of it being the default. Hacking around in a less-familiar shell seems like a bad idea if it's optional when deleting data, regardless of what's currently the default. (I realize that zsh can execute commands with Bash syntax, that's not my point.)

It's actually more appropriate to install dash, and write the script with that.

When this is done, it will run in all the shells, because the script becomes POSIX-compliant.

Making a macOS-specific script which does not make sense to run anywhere else portable to other platforms is entirely a waste of time.
Portability between bash and zsh is a waste of time?

Wasn't a previous argument that legacy Macs should remain supported if possible?

smh.

zsh has been available in every version of macOS since 10.0 - there's never been a version where bash was installed but zsh wasn't.