Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

171–180 of 252 posts

Re: Use zsh as the default shell on your Mac

#171

Earlier quoted context omitted.

IMO compatibility issues are the result of conflating a CLI with a scripting language. If a script was written for bash, run it with bash, not fish or zsh. I can withstand having two shells installed.

You can, but if Fish's value proposition is ease-of-use, then people who can't withstand that need to be able to use fish easily still. Not being able to run `PORT=5000 yarn start` or `make && ./a.out` or whatever snippet you copy-paste from the web without understanding are going to be a big pain point for newcomers to fish. Don't get me wrong, I'm a happy fish user myself. But breaking backwards compatibility with…

Fish 3.0 addresses the common `&&` and `||` operator incompatibility and if you pasted the first snippet it suggests that you should use `env`:

fish: Unsupported use of '='. To run 'yarn' with a modified environment, please use 'env PORT=5000 yarn…'

Re: Use zsh as the default shell on your Mac

#172
post #165

Earlier quoted context omitted.

In my experience Mac OS still has the edge in terms of stability. But certainly the gap is closing.

The only crashes I've had from NT kernel over the past 15 years or so are from graphics card drivers and bad RAM. Linux is a lot less stable, as a laptop OS, than Windows or OSX. Suspend and resume in presence and absence of multiple monitors is like rolling dice; locks up about 15% of the time.

Lucky you! I do a reboot on my Windows 10 machine every night. I also suffered from intermittent complete and total lockups due to a bug in what I traced to spotify. Similar thing happened with MacOS and safari recently enough too so I stopped using Safari for a while ...

Re: Use zsh as the default shell on your Mac

#173

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…

"Only install that you actually use, otherwise it can slow start time a bunch."

This doesn't make me want to use it.

Re: Use zsh as the default shell on your Mac

#174

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.

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 in your Zsh theme.

Re: Use zsh as the default shell on your Mac

#175

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.

This reason doesn't make sense, though: I can modify, replace, and overwrite the bash that comes with the system, and self sign it with a certificate of my choosing.

How do you make a certificate to self sign without going through Apple?

Re: Use zsh as the default shell on your Mac

#177
post #175

Earlier quoted context omitted.

This reason doesn't make sense, though: I can modify, replace, and overwrite the bash that comes with the system, and self sign it with a certificate of my choosing.

How do you make a certificate to self sign without going through Apple?

Keychain Access should let you do this.

Re: Use zsh as the default shell on your Mac

#178
post #172

Earlier quoted context omitted.

The only crashes I've had from NT kernel over the past 15 years or so are from graphics card drivers and bad RAM. Linux is a lot less stable, as a laptop OS, than Windows or OSX. Suspend and resume in presence and absence of multiple monitors is like rolling dice; locks up about 15% of the time.

Lucky you! I do a reboot on my Windows 10 machine every night. I also suffered from intermittent complete and total lockups due to a bug in what I traced to spotify. Similar thing happened with MacOS and safari recently enough too so I stopped using Safari for a while ...

using a Lenovo P50 with windows 10 for 2 years now, I only reboot it maybe once a month, for the rest, I close the lid, it goes to sleep, next day in the office, I open the lid and continue where I stopped. so far I have had zero issues with it.

Re: Use zsh as the default shell on your Mac

#180

Earlier quoted context omitted.

SIP and Gatekeeper and one-time commands. I find disabling SIP to be much less painful than enabling unsigned drivers in Windows. I wouldn't even classify turning off SIP as "slightly tricky". You boot into recovery mode, open the terminal, type in two words, and press enter. Besides, this is separate from the GPLv3 question. You can absolutely recompile bash and replace macOS's version with your own, so I don't unde…

It's not a problem, yet. But I would argue that it's quite clear from Apple's actions the last ~5 years that they really want to make Mac OS behave as iOS as much as possible, including making it impossible for regular users to run arbitrary non app store software. I know it sounds crazy, but they have for years now been taking steps - like this - which nobody seems to find a rational cause for, but which step by ste…

The obvious "rational" security benefits to users are:

1) Gatekeeper makes it harder to run malware; unsigned executables don't run by default, and signed malware can have its developer keys revoked by Apple.

2) SIP makes it harder for malware to modify system files.

The obvious "rational" business benefit to Apple is that:

3) Gatekeeper makes it harder to sell Mac apps without Apple getting a 30% cut

Post reply on HN