Ghost in the Shell – ZSH Setup
vermaden.wordpress.com
vermaden.wordpress.com
A few hopefully useful comments on the actual meat from a fellow traveller…
Much of the per-terminal key customising can be neatly handled with `zkbd`[zshcontrib(1)], which will also guide you with a wizard when you fire up zsh on a terminal type you haven't used before.
zsh also comes with builtin float support, so a whole heap of `bc` things can be replaced with arithmetic expressions such as `$(( x * 2.54 ))`. You can even up your game when you want more with the `zsh/mathfunc` module[zshmodules(1)], which basically just exposes math.h to the shell user.
One of my favourite options which isn't mentioned in TFA is warn_create_global, which very visibly warns you when you've forgot to scope a variable correctly. It would flag $CUT and $VULNS in `ports-check` for example.
¹ At least that is what a guy with a pink-haired pet tiger wandering a forest once promised me in a fever dream.
I will try them in my next 'free time' window and maybe add some update to the article.
Regards.
What do you mean by that sir? :)
Your other great things in this series were written in 2018?
I got so interested in reading the whole thread, that I quite lost track of time…
Sorry about that!
There are never too many shell lessons. It’s a painless entry into imperative programming for those who have never written their own scripts, and a reasonable amount of pain for those who have, and now seek atonement for their diabolical legacy.