Free Sample
+ Collection

Learning Shell Scripting with Zsh

Gastón Festari

Your one-stop guide to reading, writing, and debugging simple and complex Z shell scripts.
RRP $17.99
RRP $29.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783282937
Paperback132 pages

About This Book

  • A step-by-step guide that will show you how to use zsh and its repertoire of powerful features to improve the efficiency of your daily tasks
  • Learn how to configure and use zsh
  • Discover some advanced features of zsh such as process and parameter substitution, running on restricted functionality mode, and emulating other shells

Who This Book Is For

If you are a system administrator, developer, or computer professional involved with UNIX who are looking to improve on their daily tasks involving the UNIX shell, "Learning Shell Scripting with zsh" will be great for you. It’s assumed that you have some familiarity with an UNIX command-line interface and feel comfortable with editors such as Emacs or vi.

Table of Contents

Chapter 1: Getting Started
Installing zsh
First run
The shell prompt
Chapter 2: Alias and History
Working with aliases
Working with history
Chapter 3: Advanced Editing
Zsh line editor
Advanced editing
Don't call them widgets
Working with regions
Chapter 4: Globbing
Quoting your strings
Getting started with Globbing
Extended Globbing
The zmv function
Chapter 5: Completion
Getting started with completion
Command correction
Function definitions
Chapter 6: Tips and Tricks
Main resources
Helping tips
Other projects

What You Will Learn

  • Set up and configure the advanced aspects of zsh such as process and parameter substitution, running on restricted functionality mode, and emulating other shells, for example, ksh and Bourne
  • Customize the shell prompt to display the information you need
  • Work with the line-editor module to type less and do more
  • Use filename generation, also known as globbing, to work with files and folders
  • Discover programmable completion and never mistype a command or its options again
  • Tame the shell history and use it simultaneously on multiple shells with just a few keystrokes
  • Expand on zsh’s built-in modules and functionality by creating your own functions

In Detail

Zsh has become incredibly popular in recent times and reasonably so; the shell boasts some really great features such as command completion, filename generation, and history sharing among instances of the shell. Learning to use them to your advantage will prove to be really valuable and will save you from lots of tedious and overly-complex tasks.

This hands-on guide will show you how to configure and use zsh for work and daily tasks. It provides a clear introduction to the more powerful features of the shell such as globbing and completion. This book will help you take advantage of the real power behind the UNIX shell on both desktops and servers through real-world examples.

This book will help you understand the features of zsh and make it one of the most valuable assets in your toolbox. It will teach you how to use the shell history to look up and edit previously typed entries and take advantage of the line-editor module to speed up your typing and editing of commands. You will be able to create your own completion functions and ensure you never mistype a command or have to look at the manpages again.

You will learn how to define your own aliases and learn about filename generation so you can do more by typing even less. You will also discover the essentials of zsh and go deeper with its more advanced features. When you are done with this book, your time with the command line will be much more enjoyable and productive.


Read More