Jump to ratings and reviews
Rate this book

Moving to zsh

Rate this book
macOS Catalina changes the default shell from bash to zsh.

zsh will succeed bash as the default shell. bash has been the default shell in Mac OS X Terminal since the introduction of Mac OS X 10.3 Panther in 2003.

Like many other Mac users, have been using bash as the main shell for the last 16 years. In this book, I will document my
experiences moving bash settings, configurations, and scripts over to zsh.

This book explains
- why Apple is changing the shell
- implications for infrequent and expert Terminal users
- how to move from bash to zsh
- configuring zsh to be more productive
- moving scripts from bash to zsh

This book is based on and expands the successful blog post series on scriptingosx.com, scripting classes, and presentations. All
the topics will be illustrated with lots of useful examples and practical applications.

93 pages, ebook

1 person is currently reading
15 people want to read

About the author

Armin Briegel

5 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (14%)
4 stars
4 (57%)
3 stars
2 (28%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 of 1 review
42 reviews1 follower
February 14, 2021
Solid overview of the shell in general, setting up zsh and the scripting differences between bash and sh. Highly recommended for MacOS users, or users of oh-my-zsh etc. I no longer use oh-my-zsh after going through this book (and spending a few days on my zsh config)

Something that wasn't in the book that took me forever to work out, is that escape sequences `\033f` and `\033b` are not compatible with zsh line editor's vi-mode - they play especially poorly if you're in tmux (that's been forked from zsh - super confusing).

The trick is (tested with Terminal.app) is to ensure option as meta key setting is off & that ⌥ + arrow keys are not bound to anything. Then you can use zsh to pick up those sequences and have them still work in line editing (ZLE enabled or not)*

*VSCode you may have trouble with as those keys seem permanently bound, though there's some noise on Github to suggest this may be resolved in the future https://github.com/xtermjs/xterm.js/i...

```
bindkey "^[[D" backward-word
bindkey "^[[C" forward-word
bindkey -M viins "^[[D" backward-word
bindkey -M vicmd "^[[D" backward-word
bindkey -M viins "^[[C" forward-word
bindkey -M vicmd "^[[C" forward-word
```
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.