- Smarter completion:
- cd tab completion -- directories only
- bash can do this, but needs the bash-completion package, usually comes separately
- zsh always comes with completions, why doesn't bash?
- Completion correction / directory smarts
- if dir1/x exists and dir2 exists, then "dir/x" completes to dir1/x
- if name1 is a file and name2 is a directory with files in it, "name/" completes to "name2/"
- Better ctrl-R behaviour
- alerts you if your ctrl-R is failing
- completes it right on the prompt line while showing you what you're searching for below
- ctrl-R, enter a search term, ctrl-R repeatedly to see earlier matches, then hit backspace
- bash deletes characters in your search term
- zsh backtracks through the matches you rejected with ctrl-R, i.e. "backspaces" your ctrl-R's
- autopushd option -- every "cd" is implicitly a silent "pushd" so you can "popd" to go back any time
- better popd behaviour if a directory no longer exists
- zsh will still pop the stack, so subsequent popd's work
- bash refuses to popd
- incremental history saving option, so my .zsh_history is chronological and always up-to-date
- in any shell, I can "fc -R ~/.zsh_history" to reload in order to reuse the latest commands
- optional coloured completion (like "ls")
- autocd option -- "executing" a directory will "cd" to it instead
- e.g. if I start typing /some/dir/file and decide I want to switch to /some/dir instead, I just enter "/some/dir"
some-command-- expand output of some-command right in your shell line
- can automatically show exit status of last command
- can automatically show "time" output if a command takes more than seconds
- usually has the latest UI improvements first
- most of bash's features originally came from zsh
- probably a lot more that I've forgotten
Create a gist now
Instantly share code, notes, and snippets.
HTTPS clone URL
Subversion checkout URL
Why I love zsh (and hate being forced to use bash)