Shells

That alternative to GUIs by which you replace clicking-on-the-wrong-thing errors with typing-the-wrong-thing errors

The only thing worse than shell scripting is doing without shell scripting. Half a century on and we are still not great at bespoke automation of tasks. Unix-esque shell scripting is one passable methods for automation of some tasks, and the least awful for many, so you’d better learn it, or hire a personal assistant. Except the problem is that shell scripting is a ghastly quagmire of chaos, and, as usual, for the traditional variety of path-dependent reasons, the dominant players in the market have especially high chaos content in their quagmire.

“Shell” as I will lazily use it here may conflate several things, a scripting language, and a protocol for interacting with the system and displaying things on the screen (the “terminal”.) These all interact in complicated ways, especially on a modern system, but I’m going to brush over this nicety, because who gives a shit?1

Your list of horrible alternatives

There are many, many others than listed here, most of which only last a year or two before their maintainers resign and use bash. You too can roll your own vanity shell!

Idea: create shells cash, trash, theclash, and bangersandmash.

bash

bash is the default for most humans who must sojourn in this grim dale of automation. It has the virtues of having decades of careful crafting, optimisation and of ubiquity, and the vice of having decades of bitrot, accommodation to ill-considered primordial design choices, and of occasionally uploading all your personal data to online gangsters. I cannot personally understand why it is a symbol for the Linux ecosystem, because I find it one of the more aggravating bits.

fish

'fish` has a strong fanbase and principled design. I am now using it. It’s no fancier than it claims to be, which is to say, a belated evolution in an old ecosystem. It focuses efforts on being simple, discoverable and interactive rather than an all-singing, all-dancing programming language, of which there are already a great many. This is probably sufficient.

PowerShell

PowerShell sprang from Windows but now runs everywhere and is open source. It even looks good, although I won’t actually use it because of lock-in.

Unique selling point: rather than passing strings around between commands, PowerShell passes structured objects of various kinds. This makes it very powerful for text data processing

See Awesome PowerShell,

Post script: now Windows has bash too, and no one is safe

dash

dash is a less bloated bash clone, which by itself doesn’t seem advantage enough to sell it widely.

zsh

zsh was a young turk of a shell, and may still be seen stomping about the internet, waving its walking cane while complaining about the benighted conservatism of that frightful old fart, bash.

Plumbum

Plumbum brings a shell “feel” to python, and looks passionately maintained if not broadly used.

xonsh

xonsh uses a hybrid of python and bash syntax and has light dependencies plus the python standard library, as well as some gentle mockery of the design choices in plumbum.

neugram

neugram is … a shell for go? idk. TBC.

rush

rush is here and there, too. Some kind of ruby-backed shell? I don’t know, my mind is wandering, Dave. Would you like me to sing you a song?

General tips

Switching shells

chsh -s `which fish` myusername

Next-level piping

dgsh:

The directed graph shell, dgsh (pronounced /dæɡʃ/ — dagsh), provides an expressive way to construct sophisticated and efficient big data set and stream processing pipelines using existing Unix tools as well as custom-built components. It is a Unix-style shell (based on bash) allowing the specification of pipelines with non-linear non-uniform operations. These form a directed acyclic process graph, which is typically executed by multiple processor cores, thus increasing the operation’s processing throughput.

Realistically you’re using bash; now what?

Try out some actual commands.


  1. dedicated and wonderful developers from whose whose work I am grateful and humbled to benefit↩︎