- ZSH
- a nerd font (optional)
To get your nerd font check out getNF project or visit NerdFonts site.
zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh) --branch release-v1
Zap works on Linux, macOS, Windows (within WSL), Android (within Termux)
Add the following to your .zshrc
# Example install of plugins
plug "zap-zsh/supercharge"
plug "zsh-users/zsh-autosuggestions"
# Example install of a plugin pinned to specifc commit or branch, just pass the git reference
plug "zsh-users/zsh-syntax-highlighting" "122dc46"
# Example install of a theme
plug "zap-zsh/zap-prompt"
# Example install of a zsh completion
plug "esc/conda-zsh-completion"
You can also use Zap
to install custom plugins or source custom files present on your local filesystem. A file descriptor which points to a directory is treated as a plugin, versus a regular file. For example:
# Example install of a local plugin
plug "$HOME/plugins/my-custom-prompt"
# Example sourcing of local files
plug "$HOME/.config/zsh/aliases.zsh"
plug "$HOME/.config/zsh/exports.zsh"
By default Zap
when installing a plugin will clone a GitHub repository using a HTTPS web URL, if you require to be able to install from a private GitHub or from a different git server (for example GitLab) you can provide a different URL prefix to be used. For example, using a password-protected SSH key:
# Your ZSHRC file
...
# Example globally set Zap to git clone using an SSH key
export ZAP_GIT_PREFIX='[email protected]:'
plug "zap-zsh/private-repo"
# Example git clone using GitLab for a single plugin
ZAP_GIT_PREFIX='https://gitlab.com/' plug "user/repo"
...
It is possible to call plug
in any interactive shell session to source a file or to download and source a plugin for that particular session.
plug
outside your .zshrc
file, the plugin you sourced will not be sourced at the next shell reload.
Zap provided commands for updating and cleaning up plugins
-
To update plugins or Zap:
zap update
-
To list all plugins you are using:
zap list
-
To remove plugins you are no longer using:
zap clean
rm -rf ~/.local/share/zap
For sourcing local files use $HOME
instead of ~
when giving a full path to the file.