Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

241–250 of 252 posts

Re: Use zsh as the default shell on your Mac

#241

Earlier quoted context omitted.

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…

Out of curiosity, has Windows improved in any way from a low maintenance perspective? The reason I switched to Mac in 2006 was that I ended up using a friend's Mac for a month while abroad so I could get some work done. When I got back to a place where I could get a new Viao at a reasonable price it occurred to me that I hadn't been fighting with the Mac a single time. Wifi always worked, everything I plugged into it…

It certainly has improved, but Mac still has the edge in that regard. This mainly comes down to one things: Superior config management (plist files vs Windows registry). This makes it much easier to maintain - you hardly ever have to reinstall a Mac, instead just clean up all the Library folders and you're fine. A Mac HD also boots on any supported Mac hardware, impossible with windows, which makes things like Migration assistant and full Time machine restore possible.

Bundled apps to me are a wash. Preview >> Edge for PDFs and Terminal.app >> Cmd.exe, but explorer.exe >> Finder and Task Manager >> Activity Monitor.

Another big plus for windows is everything to do with graphics drivers and GPU support if you're into this. I also find WSL overall now better than Mac's Darwin since you get up to date Linux packages which beats homebrew in my books. Performance of WSL is also pretty good, much better than running a VM. This is really what turned Windows around for me, making it a very viable alternative.

Re: Use zsh as the default shell on your Mac

#243
post #174

Earlier quoted context omitted.

Git completion is unbearably slow for me in zsh, but fine in bash. It is a very large repo I work on, but we're talking 10s vs instant. I still use zsh though because it's nicer in other ways.

Check your Zsh theme. Zsh has no built-in support for git status, so themes that show git status are implementing this by themselves. One way to make this slow is to check git status synchronous, however there are ways to do this asynchronous that should be instantaneous (at the expense of showing git status later). Btw, Bash is the same. So you just said that someone that implemented your Bash theme did better than…

I'm taking about tab completion when entering commands, not a theme that is displaying my status anywhere. I didn't even know "themes" existed.

Your point probably stands that it's more to do with the completion scripts rather than the shells themselves though.

Re: Use zsh as the default shell on your Mac

#244

Earlier quoted context omitted.

Not the OP, but I agree with both of you actually. It's easier in many ways to run a POSIX-compliant shell with a more "familiar" scripting language to bash users (especially when it comes to running existing scripts or one-liners you find online).... buuuut at the same time I think it's pretty clear that fish's scripting language is much more modern and "better" in many ways.

I don't write shell scripts for nontrivial things and it's rare that I see a good reason to, so I'm not sure that moves the needle much. It's 2019, we have other scripting tools, etc.

Hmm, I see your point, but on the other hand: is that really a good reason to continue the status quo of shell scripting if there are improvements to be made?

Being practical about it: if you install fish you can also install bash, and then running a bash script is as simple as `bash script.sh`, so you can have your cake and eat it too.

Although, in this particular instance, if Apple is going to cease shipping bash at all, I can see why this would be annoying out of the box.

Re: Use zsh as the default shell on your Mac

#245
post #102

Earlier quoted context omitted.

I don't believe this to be true, and I don't know where this comes from. Their documented GPLv3 reluctance predated code signing on their platforms by many years. FWIW, GPLv3 was controversial even amongst GPLv2 advocates for all sorts of reasons, never mind amongst actual lawyers. No conspiracy theories required, even if you disagree with their position. The Linux kernel and many other non-GNU projects never updated…

Agreed. I think the GPLv3 patent clauses were and are a much bigger problem with Apple legal

I'd disagree (I agree with the original post). Apache 2 requires a patent grant and I've heard very few instances of this license being avoided (besides the OpenBSD folk). I really do think the fear of GPLv3 comes from the anti-Tivovization requirement -- which would essentially require that 3rd parties (e.g. me) be allowed to install modifications (e.g. modified libs/binaries) of a GPLv3 application onto the controlled iPhone.

Re: Use zsh as the default shell on your Mac

#246

Earlier quoted context omitted.

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

Git completion is unbearably slow for me in zsh, but fine in bash. It is a very large repo I work on, but we're talking 10s vs instant. I still use zsh though because it's nicer in other ways.

There are absolutely some things slower in zsh/bash. Are any of those slow because of a non-upgraded machine ("they would run fast on a $50k server" doesn't count)? Or, as others in this thread have pointed out, are they slower because of flawed implementations which, unless fixed, will always be slow on any hardware?

Re: Use zsh as the default shell on your Mac

#247

Earlier quoted context omitted.

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

No? You just resign the binary with your key.

You can't if the binary is a SIP-protected binary, and you can't use all signing features unless you disable SIP (for certain entitlements AFAIK)

Re: Use zsh as the default shell on your Mac

#248
post #144

Earlier quoted context omitted.

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 ;-)

I'm really suprised at this comment. I'm confident most of the .NET community is very happy with Visual Studio. In my opinion, Visual Studio massively outclasses Eclipse, VSCode and Netbeans. It even makes IntelliJ (which is pretty great too) look a bit inadequate. (I use Emacs these days though.)

It's why I put in: unless you have to use it, which means: if you target Windows. If you target anything else, you're probably not using it unless you already happen to have it. I agree that most IDEs are crap, it's pretty strange when you think about it, software developers developing software to develop software, but developing it badly so it now sucks for everyone.

Re: Use zsh as the default shell on your Mac

#249

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.

Why is self signing a problem? Keychain Access (macOS's password utility) has allowed this capability for years. It's possible someone could self sign malicious things, but I'd consider that a separate - if related - problem.

I suspect they also recognize that applying the GPL would force them to release things they otherwise consider private.

Re: Use zsh as the default shell on your Mac

#250

Earlier quoted context omitted.

I can't think of a single (non-malicious) rational cause for requiring code signing by default and making the requirement impossible for the user to disable . We're talking about what Apple could be planning that would violate the GPLv3. As long as the signing can be disabled by the user, there shouldn't be a GPLv3 violation.

If there were a simple checkbox in the OS to disable SIP, I would expect zillions of ‘nice’ add-ons would ship with instructions on how to disable it. I also expect zillions of helpful nieces/nephews would flip that checkbox for their uncles/aunts, and, accidentally or on purpose, leave it that way. Even if that isn’t true, making it harder for malware to flip that flag already is a rational reason to implement it th…

I have zero issues with how SIP is currently implemented. It's just hard enough to turn off to protect people, without being overly annoying.

I do worry very much about SIP becoming impossible to disable some day. Don't ban knives because people might cut themselves.

Post reply on HN