Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

91–100 of 252 posts

Re: Use zsh as the default shell on your Mac

#91

Earlier quoted context omitted.

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 inn…

Those seem like pretty big downsides to me, and I don't believe the new terminal marketing gimmick. I will admit Windows has been very attractive lately for gaming reasons, but from a development standpoint, MacOS still seems way ahead of Windows. I seriously considered it, but there would be too much I'd miss if I switched. There's some minor reasons too, like why does IntelliJ look ugly in Windows? It looks great in both Mac and Linux.

Re: Use zsh as the default shell on your Mac

#92
post #60
post #13

For the uninitiated: why is zsh better than bash?

It runs slower, so it helps encourage you to buy more expensive hardware.

If your hardware cost is driven by the performance of your shell, I question what you're doing with your terminal emulator.

I can think of essentially zero areas in which zsh is slower than bash in which it is slow enough to create the need for a hardware upgrade, or even contribute to such a need on an already-overloaded system. I mean, sure, file performance bugs if you want.

But your shell is not going to be the "oh christ, this is slow" program; it doesn't run Electron for chrissakes.

Re: Use zsh as the default shell on your Mac

#94

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

zsh doesn't require any 'plugins' for its tab-completion, everything you need is distributed with the shell. A lot of people who use zsh just don't understand how it works and think that OMZ/Prezto/whatever are doing something special for them that they couldn't achieve themselves with one line in their .zshrc (or that may even be enabled by default in their OS's global zshrc, as is the case on Ubuntu for example)

Re: Use zsh as the default shell on your Mac

#95
post #89

Earlier quoted context omitted.

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.

    $ /bin/sh --version
    GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
    Copyright (C) 2007 Free Software Foundation, Inc.

Re: Use zsh as the default shell on your Mac

#98
post #73

Earlier quoted context omitted.

Not at all. You've always been able to run your own software. At worst, it's toggling one option off in preferences that stays off forever thereafter.

Not anymore. Since 10.12 Sierra the GUI option to turn off Gatekeeper is gone, you have to use command line to turn it off. And now App Notarization is making it harder still to run your own software.

How so? I can run anything I like via the command line, and right-click -> Open still launches unsigned executables. Sure there are warnings, but that's not hard to get past.

Re: Use zsh as the default shell on your Mac

#99

I've never worked outside bash. I have a lot of simple bash scripts. (Usually just stringing together commands with the occasional pipe or output to file) Will this break all those or are bash scripts and zsh scripts basically interchangeable?

If they start with a shebang like `#!/usr/bin/env bash` indicating which shell they are written in, it should be fine.

Re: Use zsh as the default shell on your Mac

#100
post #94

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

zsh doesn't require any 'plugins' for its tab-completion, everything you need is distributed with the shell. A lot of people who use zsh just don't understand how it works and think that OMZ/Prezto/whatever are doing something special for them that they couldn't achieve themselves with one line in their .zshrc (or that may even be enabled by default in their OS's global zshrc, as is the case on Ubuntu for example)

Yeah, I went that route before settling into Oh-My-Zsh. The thing is, those single lines add up quick leading to increased mental overhead and time investment.

It's never been about 'understanding' zsh or not, it's always been about making it comfortable to use, quickly, on any given system I might use.

Sometimes a nice set of defaults is more productive than a custom solution.

Post reply on HN