Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

31–40 of 252 posts

Re: Use zsh as the default shell on your Mac

#31

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.

as far as i know !! does not work on fish, which means it's dead in the water (had to) as far as i'm concerned.

Discussion on the topic: https://github.com/fish-shell/fish-shell/issues/288

And, a omf plugin if you want: https://github.com/oh-my-fish/plugin-bang-bang

Re: Use zsh as the default shell on your Mac

#32
post #13

For the uninitiated: why is zsh better than bash?

A couple of the things that make it much better for me are plugins: zsh-autosuggestions and zsh-syntax-highlighting. I think those are both fish-inspired, but getting those features in a bash/posix-compatible shell is the best of both worlds.

Re: Use zsh as the default shell on your Mac

#33

I still fondly remember when tcsh was the default shell. Like a real BSD Unix.

It's still in there. The linked article tells how to do it.

In Terminal, enter $ chsh -s path, where path is one of the shell paths listed in /etc/shells, such as /bin/zsh, /bin/bash, /bin/csh, /bin/dash, /bin/ksh, /bin/sh, or /bin/tcsh.

Re: Use zsh as the default shell on your Mac

#35
post #17
post #13

For the uninitiated: why is zsh better than bash?

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.

Re: Use zsh as the default shell on your Mac

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

Re: Use zsh as the default shell on your Mac

#37

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.

Sorry, how is that a problem? Users can build and execute code on their own Mac with XCode.

Re: Use zsh as the default shell on your Mac

#40

I still fondly remember when tcsh was the default shell. Like a real BSD Unix.

It's still in there. The linked article tells how to do it. In Terminal, enter $ chsh -s path, where path is one of the shell paths listed in /etc/shells, such as /bin/zsh, /bin/bash, /bin/csh, /bin/dash, /bin/ksh, /bin/sh, or /bin/tcsh.

Indeed. The point was it was the default shell, being true to its heritage.
Post reply on HN