Skip to main content

Zsh, Zsh, wherefore art thou, Zsh?

Let's get this out of the way: yes, I know "wherefore" means "why." But people constantly misuse it to mean "where." It's my blog and I'll pun badly if I want to.

In 2019, Apple moved to using the Z shell (henceforth "zsh") instead of bash as its Terminal shell on macOS. Recent versions of bash had moved to the GPL version 3, which places limits on patent licensing, and so MacOS had stuck with bash version 3.2, which by then was ancient.

Most target users of Macs probably didn't notice, of course - before OS X, Mac OS didn't even *have* a shell or command line of any kind, and the first Mac keyboards didn't include cursor keys, as the Mac was intended to introduce a whole new paradigm to the general public. (The Xerox Alto and other computers from Xerox, which introduced the concept of the GUI, were far, far too expensive for general consumption. The Xerox Alto, for example, cost $100,000 *in 1971 dollars*; the Xerox Star, the later commercialised version, cost upwards of $16,000 when it was released in 1981.) 

(As an aside, Apple has changed the capitalisation and even the name of its Macintosh operating system several times; I've tried to use the correct name and the correct capitalisation above for each stage of the OS I've referred to, though I could go on. Yes, it's annoying and confusing and arguably un-Apple-y, and yes Apple should stop doing it, even if leaving it as it is now leaves us with the inconsistent usage of Mac(intosh) computers and macOS system software.)

However, ashamed as I am to admit that I don't use many of the advanced features of zsh, I had been using it on Linux for about five years before Apple decided to swap out bash for it. Nevertheless, its tab completion and its (third-party?) add-on oh-my-zsh, knock bash out of the park IMO. I'm sure expert users of the shell could tell you about many, many other features that make them prefer it over bash. Bash has tab completion, of course, but zsh's tab completion is *so* much better that it makes it a real joy to use. Bash is a fine shell, but it's nice to have choices.

So what's the problem with zsh? Zsh hasn't been updated since February 2020, and at the time of writing (October 2021) that makes it 18 months old, which in software development terms is an absolute age. Now, shells don't need to keep up with whizz-bang features very often, and you're unlikely to see a shell version jump just because a competitor released version X+1 (hello, Windows 11), but they do need to be updated *sometimes*. Occasionally someone comes up with a great new feature for a shell (tab completion and job control, common features of modern shells, were once - circa 1981 - brand-spanking whizz-bang features and an absolute godsend to users who had never before had access to them), but bit rot and API changes can break compatibility in mysterious ways. So it's important to keep software updated - especially software as essential - to its users - as a shell - to make sure you don't fall behind and your users can still use your software on modern versions of whatever operating system you're using.

Now, if it becomes apparent to Apple that the zsh community have simply stopped updating it, I'd imagine - given that it's so essential to the OS - that they'd take up development. Notwithstanding the fact that "people familiar with the matter" tell me that the UNIX underpinnings of macOS are getting increasingly crufty. But Apple isn't known for releasing their software as open source (the Swift programming language being a notable exception). So any changes they make to modernise zsh could be limited purely to the small (but healthy) market for Macintosh machines, leaving Linux users either with an old version of zsh or with the need to develop a fork. Most Linux users probably use bash, but for those of us who don't, it's convenient to be able to move from the Z shell on Linux to the same shell on Mac - again, presumably even more convenient for those who use its more advanced features. So it would be a shame if it was forked. It would be a wonderful example of how forks can be detrimental to software development.

It's also entirely possible that I'll be proven to be a doom-monger by the time you read this blog, and version 6.2 (zsh is currently stuck at version 5.8) comes out tomorrow and rolls out to everyone using zsh before the end of next week. But it sure would be a shame if one of the best pieces of open source software (IMO) were to silently die on the vine just because the developers stopped updating it.

In the highly unlikely event that any of the zsh developers read this, thanks for your hard work so far, and here's to many more years of productive zsh development to come.

Comments

Popular posts from this blog

Moving House: Part 1

I have used ThinkPads since getting my second laptop to run Linux on in about 2015. The first laptop was a Fujitsu, (one of the first models to come with an AMD64 processor rather than the 32-bit x86, which by then were showing their age) - which I loved, but which came to a premature end when I poured coffee on it. (By contrast, I once poured beer on a ThinkPad, and it survived.) There followed a long hiatus when I didn't have a laptop at all, although at one point I did acquire an MSI netbook running SUSE Linux Enterprise Desktop out of the box. Before and after that first Fujitsu laptop, I had been running Linux since about 1997 on a variety of desktops, and I'm also that rare Linux user who happens to love both Macs and MacOS (or however they're capitalising it this week), even though I wish they weren't so proprietary (and in some, though not all, cases, expensive).  Nevertheless, I recognise that, like the scores of high-end workstation and home computer manufactu

Refused Asylum

 Well, I certainly didn't expect to be typing not one, but three blog entries in one week - let alone three on a theme of moving home (or not). No, there's still nothing wrong with the XPS that a binary blob (and a new battery) wouldn't fix, though after a bit of a disaster upgrading from Ubuntu MATE 21.04 to 21.10-beta, I'm currently running openSUSE Tumbleweed, which, although it has its quirks, is certainly an easier thing to get to grips with than  the new Safari . (As an inveterate distro-hopper who nevertheless has never spent much time on openSUSE, I think I'll keep it around for a good while, this time, and see how it strikes me over an extended period of use.) Yes, you can change the new Safari tab bar back so it's separate from the address bar; yes, you can move the address bar from the bottom back to the top. Unfortunately, you're stuck with the new tab bar redesign, since the option to turn them back into the old-style tab bars is gone from Safar