Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

131–140 of 252 posts

Re: Use zsh as the default shell on your Mac

#131

Earlier quoted context omitted.

How's using homebrew any of this different than being able to run "base64" and "uuidgen" on Windows? It's not like either of those applications are part of a Windows installation anyway.

That's my point. Why can't Apple ship an updated userland built in, through the Store, or as a download triggered by a command line (like XCode is).

Because GPL v3 says you have to run modified binaries and that means Apple has to give its private keys.

Re: Use zsh as the default shell on your Mac

#132
post #80

Earlier quoted context omitted.

I've been building software with Homebrew for ages, where does signing come in?

The default bash on macOS is protected using SIP. Files covered by SIP can only be replaced by Apple-signed updates. (Of course, one could disable SIP altogether.)

Somehow I don't think GPLv3 presumes that you'll replace system files. And I'm using Homebrew versions of system-bundled utils just fine without overwriting them.

Re: Use zsh as the default shell on your Mac

#133

Earlier quoted context omitted.

"from a development standpoint, MacOS still seems way ahead of Windows" Sorry but have you heard of Visual Studio?

Everyone has heard of Visual Studio, and nobody that has to use it wants to. Just because you have Stockholm syndrome doesn't mean everyone else has to have it too ;-)

Must be a different development sphere to me. I have to use xcode for dev on the Mac and it is feeble compared to VS. I can't think of a better IDE to be honest (C++, C# for me).

Whenever I have to use other offerings like Eclipse, Netbeans or Android Studio for other languages I am never very satisfied with them. Android Studio in particular breaks gradle and projects between updates, although Flutter seems to work.

Re: Use zsh as the default shell on your Mac

#134

While Apple is at modernizing their POSIX userland, they should also consider other ancient software they're using. For example, last I looked on Apple's Darwin Open Source site (about a year or two ago), they shipped a really old and buggy awk (nawk) version.

Can we get a modern python version while we're at it?

Re: Use zsh as the default shell on your Mac

#135

zsh is the default shell on all of my machines because I make it so. I think the tab completions that ohmyzsh provides have saved me on the order of 40 hrs / year, and helped me learn new APIs much easier, since you can see all options without the --help. If you haven't tried it, I cannot recommend zsh + plugins enough. Only install that you actually use, otherwise it can slow start time a bunch. Here is a list of th…

Shout out to the fish shell which can do all the fancy syntax highlighting and show command options out the box with no plugins

I used fish for a while. It was nice but way too many compatibility issues. Zsh is a nice compromise.

Re: Use zsh as the default shell on your Mac

#136

Earlier quoted context omitted.

"from a development standpoint, MacOS still seems way ahead of Windows" Sorry but have you heard of Visual Studio?

Everyone has heard of Visual Studio, and nobody that has to use it wants to. Just because you have Stockholm syndrome doesn't mean everyone else has to have it too ;-)

VS is pretty nice if you run it without plugins that slow it down (like ReSharper)

Re: Use zsh as the default shell on your Mac

#137
post #135

Earlier quoted context omitted.

Shout out to the fish shell which can do all the fancy syntax highlighting and show command options out the box with no plugins

I used fish for a while. It was nice but way too many compatibility issues. Zsh is a nice compromise.

They fixed many of those recently. And just in case you have a script that doesn't run, you can install a plugin called `bass` that basically runs them in your native bash without leaving fish.

Re: Use zsh as the default shell on your Mac

#138
post #62

Earlier quoted context omitted.

What's your ??? That's homebrew, not Apple.

So? Apple doesn't ship updated packages. It never did. If you want updates, you use a package manager, not Apple's ancient crap. That's life.

>So? Apple doesn't ship updated packages. It never did.

The parent's point is that Apple had to do something with updating their bash userland, as they don't want to use the later GPLv3 versions.

Apple does ship updated packages (it has routinely updated Python, Ruby, and tons of other UNIX userland).

It just doesn't update old GPLv3 packages, so it was left with an old bash.

Your suggestion "if you want updates" refers to the parent, who already knows all you wrote. His point is that Apple wanted to update the default shell (but couldn't as long as it was bash), not them. Given that, the context, the homebrew suggestion is irrelevant.

Re: Use zsh as the default shell on your Mac

#139
post #36

I'm really surprised they went with zsh rather than fish. I guess they want to preserve the ability for existing `source` scripts to work.

I think it is mainly because `fish` is incompatible with everything. Most `bash` scripts runs fine in `zsh` (`zsh` has even a `bash` compatibility mode, not necessary generally because rarely `zsh` and `bash` diverges), no `bash` script runs fine in `fish`.

Many of my `bash` scripts run just fine in `fish`, especially since v3 released.

Re: Use zsh as the default shell on your Mac

#140

zsh is better than bash in nearly all aspects, at least in my use cases, so this is a great news for me. Is there anything that can be done in bash but not in zsh?

The only thing I noticed in 10 years of zsh use is that `printf "%b\n"` can be used in bash but not in zsh to unescape C-style strings: E.g. `printf "%b\n" '\"abc\"'` ==> "abc"
Post reply on HN