My Authors
Read all threads
Why to actually use ZSH:

Shells have always been the black sheep of programming, basically because compatibility reasons have made it difficult to adopt useful ideas from language design. If you break borne compat in meaningful ways, nobody will use your shell.
At the same time, shell design has always been pretty organic and ad-hoc. So a shell designer is trying to let the user command the computer in a rich way while maintaining compatibility with a bunch of features individual dudes in the 70s and 80s thought were worth coding.
There's very little overarching design and very little unified style, and what you really need compatibility with for a successful shell is a series of compromises created by committees evaluating the claims of warring vendors.
(Imagine that in 2007, a standardization committee formed to spec out a language 'J#' that is compatible only with the set of programs that are valid as both Java and C# programs. And then imagine it's 2037 and you're trying to add structural typing.)
Zsh does a remarkably good job of:
1) providing decent compatibility with most common shells out of the box
2) providing good compatibility with most common shells with flags
3) adding 'real programming language' features like, fucking, FFI in a way that feels natural
That can be really useful if you're a developer and you do a lot of complex work in the shell, or if you like to prototype in the shell, or you actually mostly write shell scripts.
Lots of folks are used to using, like, bash, and then ducking into a python or node repl in order to do things like... non-integer arithmetic.

Zsh has good arithmetic out of the box, and also, you can import a socket library and write a gopher server in like 3 lines...
So, zsh basically solves the problem of "my shell is missing core programming language features" while not causing a different "my shell is not really compatible with bourne / ksh / csh" problem.
Zsh also exposes a lot of flags for granular behaviors, like when to split & how splitting interacts with quoting. At least once, when writing a complex script, I changed splitting mode *in a loop*, and this allowed me to keep this script in shell rather than rewriting it.
Zsh is also substantially faster than bash (both in terms of startup time & in terms of core functionality). This probably doesn't matter at all, because a fairly naive shell script in any shell is probably going to be miles faster than whatever java monstrosity the mgt approves.
Now, zsh has a lot of third-party shit, and some of it is cool, but I don't think that's really an argument in its favor. Node has a lot of third-party shit, and that ecosystem is a nightmare.
Downsides of using zsh:

1) you will actually need to install it, and you'll probably run into a lot of systems that default to bash (or worse, dash). zsh will spoil you and dash will suck extra hard when you need to use it.
2) the default configuration is TERRIBLE, and while zsh prompts you to reconfigure it with the menu on first startup, unless you are already a heavy zsh user, you will probably have NO idea how to make it non-terrible from that menu.
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with nothing has prepared us for the strange times

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!