Skip to Content
Learning Shell Scripting with Zsh
book

Learning Shell Scripting with Zsh

by Gaston Festari
January 2014
Beginner
132 pages
2h 45m
English
Packt Publishing
Content preview from Learning Shell Scripting with Zsh

Working with regions

Continuing the legacy of Emacs' inherited behavior, you can set regions in the command line by holding Ctrl and pressing the Space bar. This will trigger a region selection mechanism that you can expand with the arrow keys, which works just as if you were clicking and dragging your mouse to highlight text.

So, why bother with regions? You could, for example, mark a region via the Ctrl + Space bar sequence and then perform a command on top of it (similar to capitalize-word we saw earlier), or even mix-in the previously mentioned execute-command to call a function that has no keybind. Overall, these few niceties straight from Emacs give ZLE (and of course, zsh) the versatility to behave almost like a full-fledged editor.

Multiline ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Zsh in macOS: Terminal Commands for Unix

Zsh in macOS: Terminal Commands for Unix

Karl Hadwen

Publisher Resources

ISBN: 9781783282937Supplemental Content