Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

81–90 of 252 posts

Re: Use zsh as the default shell on your Mac

#81
post #17

Earlier quoted context omitted.

The uninitiated won’t notice much of a difference, and that is bound to be the point. Bash on macOS is stuck at version 3 due to licensing reasons (GPL3), while ZSH is not (MIT).

For even more historical context, macOS originally shipped with tcsh. We've already done the shell transition once, and basically nobody noticed.

That wouldn’t have broken as much, since everyone’s scripts would have a bash or sh shebang line on top. Changing what /bin/sh points to is a much riskier change.

Re: Use zsh as the default shell on your Mac

#84
post #62

Earlier quoted context omitted.

??? # change default shell to newer brew'ed bash brew install bash && sudo dscl . change /users/$USER UserShell /bin/bash /usr/local/bin/bash # change default shell to newer brew'ed zsh brew install zsh && sudo dscl . change /users/$USER UserShell /bin/bash /usr/local/bin/zsh

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.

Re: Use zsh as the default shell on your Mac

#85

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 really like fish and had a pretty good run using it, but I have found myself on zsh for quite a few years - it’s just less friction to go with the herd on this particular part of my toolbox

Re: Use zsh as the default shell on your Mac

#86

Earlier quoted context omitted.

Since when is mainstream better? Why did they choose zsh? They don't justify that either. It's just odd to pick one post-bash shell but not the other when they have very similar feature sets—autocomplete, persistent global variables, attention to end-user quality. EDIT: apparently zsh doesn't have persistent or global variables, my bad.

There's already a lot of community support available for zsh. Plenty of developers are using oh-my-zsh either for just the plugin support or for the very popular iterm+powerlevel9k+agnoster theming.

Oh-my-zsh is indeed pretty dang slick

Re: Use zsh as the default shell on your Mac

#87

For those wondering why Apple is allergic to GPLv3 code: there is a clause in the license requiring you provide a way to run modified version of the software which would require Apple to let users self sign executables.

So, Homebrew? You can't tell me that Microsoft is able to ship entire distribution's userlands (Debian, Ubuntu, SUSE, and more) through the Windows Store, including all their GPL3 components, and Apple can't figure out how to ship an updated version of base64. If I'm grumbling, it's just because making devops/CI scripts work on Windows and Linux is easier than MacOS and Linux these days because my colleagues run into…

I've moved on to Windows since last year. Besides terminal emulators being shit (which they're fixing now), worse PDF support and shit OS config management, there's really not much anymore that goes in favor of Macs. Their laptops are worthless junk at 40% markup, the OS gets buggier and more locked down with every version while Windows is on a clear trajectory of improvement and PC hardware gives real choice and innovative solutions. I was a Mac user for 13 years, but no more. Since they gave all the keys to Jony it went down the drain real fast.

Re: Use zsh as the default shell on your Mac

#88
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.

Apple stopped shipping updated packages because bash went GPLv3...

Since ZSH is under an MIT-like license, they’ll probably ship updates to it.

Re: Use zsh as the default shell on your Mac

#89

Earlier quoted context omitted.

For even more historical context, macOS originally shipped with tcsh. We've already done the shell transition once, and basically nobody noticed.

That wouldn’t have broken as much, since everyone’s scripts would have a bash or sh shebang line on top. Changing what /bin/sh points to is a much riskier change.

Is that what they've done? The linked article doesn't say that.

Re: Use zsh as the default shell on your Mac

#90

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
Post reply on HN