---
title: Zsh
kind: note
description: shell
words: 89
readingMinutes: 1
created: '2022-01-28T00:00:00.000Z'
updated: '2026-07-22T20:52:10+02:00'
website: https://zsh.sourceforge.io/
---
## Link

<https://zsh.sourceforge.io/>

# Resources
- [Replacing the File Manager in Zsh](http://www.bash2zsh.com/essays/essay1_file_manager.html)
- [Oh My Zsh](https://ohmyz.sh/) - framework for managing Zsh configuration
- [Wikipedia](https://en.wikipedia.org/wiki/Z_shell)
- [A Beautifully Productive Terminal Experience](https://www.mikebuss.com/posts/a-beautiful-productive-terminal-experience)
- [Options](https://zsh.sourceforge.io/Doc/Release/Options.html) documentation
- [sorin-ionescu/prezto](https://github.com/sorin-ionescu/prezto) - a configuration framework for Zsh
# Shortcuts
| Shortcut   | Function                   |
| ---------- | -------------------------- |
| `Ctrl`+`R` | Search through the history |
| `Ctrl`+`C` | Stop running command       |
# FAQ
## Reminder: do not redeclare `path`
`path` is a pre-existing special zsh array tied to `PATH`; don’t redeclare/shadow it as an ordinary variable.
## Loops
### Generic form
```shell
for item in list
do
  command1
  command2
done
```
### Generic one-liner
```shell
for item in list; do command1; command2; done
```
### Example one-liner (show current branches)
```shell
for dir in ~/path1 ~/path2; do echo "$dir"; git -C "$dir" rev-parse --abbrev-ref HEAD; done
```
