Hacker News new | ask | show | jobs
by jdboyd 1703 days ago
I've been trying to stick with bash for at least 20 years (I did have a brief tcsh phase before that) since a time when sticking with it meant having to install it on every unix system I touched. However, now that MacOS defaults to zsh, I'm starting to wonder if I should summon up the effort to change again.
2 comments

I think the most noticeable difference is that `$foo` doesn't word-split unless you do `${=foo}`. Beyond that, I don't think one would notice they were using zsh instead of bash. In most ways, zsh is pretty much a superset of bash.
personally, I don't have interest in zsh because bash is the default shell in Linux, which is the UNIX system I use (I find mac's unix to be really a weird variant). Mac switching to zsh is just more evidence they're diverting from the mainstream.
> I find mac's unix to be really a weird variant

It's closer to BSD than it is to Linux. Not super similar, but closer, especially in ways one tends to notice on the command line.

It still sticks pretty close to BSD. I am seeing a ton of (entirely natural) similarity since I started seriously playing with FreeBSD
you're right, Mac OS X is a derivative of BSD but it also has significant Mach tech (like the linker).

I've used freebsd for years and I still find Mac OS to be the least useful UNIX.

Ironic it's one of the few (only?) popular, widely deployed ones left that gets to sport the fact it's a certified Unix OS - https://www.opengroup.org/openbrand/register/
Sort of. I see this a different way. Many years ago, Linux replaced UNIX as the "standard UNIX", and certification become irrelevant.

Further, unless I'm missing an important technical detail, Linux could, with some effort, pass the certification process.

Apple switched to zsh because newer versions of bash are licensed under GPLv3.
I know what the reason is. I don't care. I use GPLv3 and have no interest in an OS that doesn't. You can run bash on windows or compile it yourself on any platform. microsoft even distributes it with windows.
Not strictly correct. It's provided by whatever WSL distro you download, and that download comes from the distro as opposed to Microsoft.
Compile it yourself on MacOS, problem solved. Or install it with Homebrew?
IIRC, MacOS had to ship with a fairly old version of bash by default because newer versions have a more copyleft license; I always assumed that their swap to zsh was because they wanted something both up to date and compatible in terms of the license (and the fact that most bash "just works" when you run it in zsh is a plus).
macOS is about as standard of a Unix as you can get, apart from Linux with coreutils.