It's like Korn Shell (ksh).
I'm currently using zsh v5.6.2.
zsh -f to disable your config.
If it works, read and fix your config.
cd and others.
-e to use emacs keys
man zshcompsys. Make sure to use the newer system.
You can extend zsh by writing functions.
They look a bit like C functions, but the signature is always empty (no named parameters).
There is an autoload command. Use this to tell zsh what file a named function lives in. It will be loaded when used.
Aliases are defined using: alias this="that"
They can't have arguments/parameters.
Here is a cursor keys pattern, found with
# Ctrl keys move the cursor forward and backward one word bindkey '^[[1;5C' forward-word bindkey '^[[1;5D' backward-word # Alt keys do the same, because that's the behaviour in Emacs bindkey '^[[1;3C' forward-word bindkey '^[[1;3D' backward-word
$RPS1 to set the left and right-hand sides of the prompt respectively.
vcs_info to give you information about version
control. Find out something about this using
zshcontrib. However, this manual is a bit nuts, so background reading
on the web is probably required.
Define an array with
thing=('first item' 'second item'), then access them with
They are 1-indexed (unless you set the KSHARRAYS option).
zsh has fancy globbing.
- standard multi-character wildcard
Also, in zsh when you do parameter expansion (substitution), globals won't come into effect and the parameter won't be split on whitespace.
zsh prints an error if your glob doesn't match a file, unless you set the NONOMATCH option.
zsh will tell you when your background jobs finish.