From https://en.wikipedia.org/wiki/Z_shell
The Z shell (zsh) is a Unix shell that can be used as an interactive login shell and as a powerful command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
Assumes Homebrew is already installed.
brew update
brew install zsh
- Test drive with
/bin/zsh
or replace your default shell withchsh -s /bin/zsh
Start by installing Oh My Zsh, a plugin & theme manager for zsh.
https://github.com/robbyrussell/oh-my-zsh or sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Oh My Zsh will live in ~/.oh-my-zsh
. There are many default plugins in ~/.oh-my-zsh/plugins/
. You can enable them by adding their folder name to the plugins=(example)
directive in ~/.zshrc
.
The wiki will have a lot of information about the bundled plugins - https://github.com/robbyrussell/oh-my-zsh/wiki
Adding other plugins is usually done by cloning the Github repo or otherwise into ~/.oh-my-zsh/custom/plugins/
. Enabling is same as above.
Modify ~/.zshrc
with your specific configuration details.
Plugins and other ZSH specific config must be before the source $ZSH/oh-my-zsh.sh
.
- Syntax highlighting
- Autosuggestions for completing your command based on history
- History search, similar to above but lets you search your history using the up/down keys on partial commands
- ???
plugins=(sudo brew git bundler osx sublime vagrant rake ruby zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search)
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)
setopt autocd
Oh My Zsh comes bundled with a few default themes. See a brief gallery here - https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
Enable a theme by modifying ZSH_THEME="mytheme"
in ~/.zshrc
.