ZPM - Zsh Plugin Manager
ZPM ( Zsh plugin manager ) is NOT a yet another plugin manager for zsh. zpm ( ZSH Plugin Manager ) is a plugin manager for ZSH who combines the imperative and declarative approach. At first run, zpm will do complex logic and generate cache, after that will be used cache only, so it makes this framework to be very fast.
- Fastest plugin manager (Really, after the first run, zpm will not be used at all)
- Support for async loading
- Dependencies between packages
- ZPM plugins are compatible with oh-my-zsh
- ZPM runs on Linux, Android, FreeBSD and macOS
- Extensible
Extensions for zpm itself
- zpm-readme - Show plugin readme in terminal
- zpm-info - Show plugin info in terminal
- zpm-bugreport - Quickly create bugreport for zsh plugin
- zpm-telemetry - Send telemetry data. Keep calm. Data is sent using GitHub and you can see it before sending.
Stats
Test on Intel I7-8750H, SanDisk SD7SN6S, 16GB RAM
zsh -i -c exit 0.01s user 0.00s system 100% cpu 0.010 total
zsh -i -c exit 0.01s user 0.00s system 101% cpu 0.010 total
zsh -i -c exit 0.01s user 0.00s system 100% cpu 0.012 total
zsh -i -c exit 0.00s user 0.01s system 100% cpu 0.010 total
zsh -i -c exit 0.00s user 0.00s system 101% cpu 0.008 total
zsh -i -c exit 0.01s user 0.00s system 100% cpu 0.010 total
zsh -i -c exit 0.01s user 0.00s system 99% cpu 0.010 total
zsh -i -c exit 0.01s user 0.00s system 100% cpu 0.009 total
zsh -i -c exit 0.01s user 0.00s system 99% cpu 0.010 total
zsh -i -c exit 0.01s user 0.00s system 103% cpu 0.010 total
With this set of plugins. 48 total
zpm-zsh/helpers
zpm-zsh/colors
zpm-zsh/background
zpm-zsh/vte
zpm-zsh/core-config
zpm-zsh/check-deps
zpm-zsh/minimal-theme
zpm-zsh/pr-user
zpm-zsh/zpm-telemetry
zpm-zsh/btrfs
zpm-zsh/zpm-readme
zpm-zsh/zpm-info
zpm-zsh/ignored-users
zpm-zsh/material-colors
zpm-zsh/pr-is-root
zpm-zsh/pr-return
zpm-zsh/pr-exec-time
sindresorhus/pretty-time-zsh
zpm-zsh/pr-git
zpm-zsh/pr-cwd
zpm-zsh/pr-php
zpm-zsh/pr-rust
zpm-zsh/pr-node
zpm-zsh/pr-2
zpm-zsh/pr-eol
zpm-zsh/pr-zcalc
zpm-zsh/pr-correct
zpm-zsh/ls
zpm-zsh/colorize
zpm-zsh/ssh
zpm-zsh/dot
zpm-zsh/undollar
zpm-zsh/dropbox
lukechilds/zsh-better-npm-completion
zpm-zsh/clipboard
zpm-zsh/mysql-colorize
zpm-zsh/zshmarks
voronkovich/gitignore.plugin.zsh
zpm-zsh/autoenv
mdumitru/fancy-ctrl-z
zsh-users/zsh-history-substring-search
zdharma/fast-syntax-highlighting
zsh-users/zsh-autosuggestions
psprint/history-search-multi-word
omz/extract
omz/command-not-found
omz/wp-cli
zpm-zsh/template
Base dependences
Instalation
Add the following text into .zshrc
if [[ ! -f ~/.zpm/zpm.zsh ]]; then
git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh
If you don't have .zshrc
copy example of .zshrc
from zpm
cp ~/.zpm/zshrc ~/.zshrc
How to use
Add your zpm commands to ~/.zshrc
after zpm initialization:
zpm load github-user/github-repo # Download and enable the plugin from GitHub
zpm if linux load github-user/github-repo # Load plugin only on Linux
zpm if-not linux load github-user/github-repo # Don't load the plugin on Linux
zpm load gitlab-user/gitlab-repo,type:gitlab # Download and enable plugin from GitLab
zpm load bitbucket-user/bitbucket-repo,type:bitbucket # Download and enable the plugin from Bitbucket
zpm load plugin-form-oh-my-zsh,type:omz # Load plugin form oh-my-zsh
zpm load omz/plugin-name # Load plugin form oh-my-zsh
zpm load github-user/github-repo,async # Async load
Notice: if you change
~/.zshrc
, you need to remove zpm cache:zpm clean
if
conditions:
linux
- if current OS is Linuxbsd
- if current OS is *BSDmacos
- if current OS is macOStermux
- if current session run in Termuxssh
- if session run on remote hostvte
- if session run on VTE based terminal emulator
The condition can be combined zpm if macos if-not ssh load repo/plugin
Tags
Zpm supports tags for plugins:
apply
tag
This tag has 3 possible arguments:
source
- for source this plugin, enabled by defaultpath
- add/bin
folder to your$PATH
, only if it exists, enabled by defaultfpath
- add plugin folder to your$fpath
, only if exist at least one_*
file, enabled by default
some/plugin,apply:source:path:fpath
async
tag
If this tag is present, zsh plugin will be loaded async
source
tag
Define own file woh will be load
zpm some/plugin,source:/other.file.zsh
path
and fpath
tags
Using these tags you can change the destination of folders which will be added to $PATH
or $fpath
zpm some/plugin,path:/executables
zpm another/plugin,fpath:/completions
type
tag
This tag has the following parameters:
type:gitlab
- plugin will be downloaded from GitLabtype:bitbucket
- plugin will be downloaded from Bitbuckettype:omz
- zpm will use a plugin from oh-my-zsh, oh-my-zsh will be download if not installed
plugin-from/gitlab,type:gitlab
plugin-from/bitbucket,type:bitbucket
plugin-form-oh-my-zsh,type:omz
hook
tag
This tag param contains command who will be run in the plugin directory
zpm plugin/name,hook:"make; make install"
Upgrade
Run zpm upgrade
for upgrading, or run zpm upgrade some-plugin another-plugin
if you want to upgrade only these plugins