Book Image

Learning Shell Scripting with Zsh

By : Gaston Festari
Book Image

Learning Shell Scripting with Zsh

By: Gaston Festari

Overview of this book

Table of Contents (13 chapters)

Don't call them widgets


There comes a time in the life of any eager zsh learner to talk about widgets. It's time you and me had that talk already.

Ever wondered how all those keybindings and special actions are put together and work marvelously? Well, we have widgets to thank for that. See, zsh likes to delegate responsibilities whenever it can, and widgets are a prime example of that; instead of having to deal with handling every little action performed by key sequences (similar to those defined in your keymaps), zsh relies on widgets to do the actual work. Think of them as small functions designed to carry out a simple mission. I, on the other hand, like to think of them as those sneaky gnomes that make magic happen in the kitchen whenever I'm not around.

ZLE comes with quite a few built-in widgets, each boasting two names, a vanilla name and a hidden name, which is simply defined as the normal name and preceded by a dot . character. Hidden names are there just to signal that they can't...