MacOS 10.15 (Catalina) switches from bash to zsh

Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15)
Use zsh as the default shell on your Mac - Apple Support

Another interesting fact is that Catalina also comes with /bin/dash

Yeah, I read somewhere it was related to licenses issues.

When I upgraded to Catalina, I noticed that existing users who were using bash (like me) as their default shell, still have bash after the upgrade.

Anyway, since I'm am more of a PHP (and more and more, Python) guy for scripting (for processing text), this change does not really impact me; but since I do write some scripts in bash for Linux, I will stick to bash as my default shell on MacOS for now.

I'm very interested to hear and read from the "hard core shell scripting folks" about their views on this change.

See also:

Zsh Primer for Busy People . zaiste.net

1 Like

zsh is a really odd choice. It's a hodgepodge of features from bourne and csh, with its own special extensions. It's not comparable and not compatible.

I don't know why they needed a shell to be app-store compatible, but it probably isn't good. Perhaps they're ripping OSX apart and moving bits to the app store. It mMakes sense from a business point of view -- a good way to force everyone who's avoided the app store to use it. It makes sense from a software point of view -- why have two installer/updater systems?

1 Like

I am not sure if I am "hard core" but in general it does not matter to me so long as bash is not removed from the '/bin' drawer|folder|directory at all.
Reason: AudioScope.sh does not run in the zsh shell and I now try to get everything working in POSIX compatibility mode.

So that makes me indifferent because if 'zsh' is as POSIX compliant as the developers say it is then that's fine by me...

You'll find that zsh is similar to bash. Many bashisms work in zsh.

In rare cases zsh deviates from sh and the standard, for a good reason.
For ex $var in a for list is not expanded the usual way; you must explicitly enforce it with ${=var}
(And because zsh like bash allows $#var instead of the standard ${#var} you may use $=var .)
Now ask yourself: how often do you want this kind of expansion, and how often do you stumble over an unwanted expansion?

Hi.

Thanks to Scrutinizer for starting this (and possibly to wisecracker for an earlier note).

My collection of links is below, in no specific order of usefulness.

My current interest in shells is zsh , but also the very new nu , and PowerShell ( pwsh ). The nu shell looks to be very useful for tables/csv files, and is written in Rust, a language in which I am also interested (the grep-work-alike written in Rust is the fastest of the greps which I track and periodically test: GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern).

Here are some links to information on these ... cheers, drl

pwsh
Learn PowerShell in a Month of Lunches, Linux and macOS Edition
Manning | Learn PowerShell in a Month of Lunches, Linux and macOS Edition

nushell, nu:
homepage = Nu
documentation = Introduction - The Nu Book
repository = GitHub - nushell/nushell: A modern shell written in Rust

zsh

Fri Oct 25 07:34:25 CDT 2019

Zsh Primer for Busy People . zaiste.net

( Suggested by Neo at unix.com )

-----

Tue Jul  2 05:52:59 CDT 2019

Z shell - Wikipedia

Comparison of command shells - Wikipedia

https://www.reddit.com/r/zsh/comments/bwpcsq/apple_makes_zsh_the_default_shell_on_macos/

http://zsh.sourceforge.net/FAQ/zshfaq01.html#l4
( what is zsh good at? )

https://i.redd.it/edvmdpaip6431.png
( humor )

tutorials about zsh

https://linuxconfig.org/learn-the-basics-of-the-zsh-shell

http://zsh.sourceforge.net/Guide/
( last updated 2003 )

https://reasoniamhere.com/2014/01/11/outrageously-useful-tips-to-master-your-z-shell/

https://wiki.archlinux.org/index.php/Zsh

https://www.unixtutorial.org/install-oh-my-zsh

http://zsh.sourceforge.net/Doc/Release/zsh_toc.html

https://askubuntu.com/questions/1577/moving-from-bash-to-zsh

book (2005):
https://www.amazon.com/dp/1590593766/

-----

https://unix.stackexchange.com/questions/38172/are-all-bash-scripts-compatible-with-zsh

Many answers now include zsh. The poster "Stéphane Chazelas" has
often posted in such situations, on https://unix.stackexchange.com/

For example, see:
https://unix.stackexchange.com/questions/534480/how-to-change-uppercase-letters-of-my-file-name-to-lower-case
4 Likes