The best zsh plugin management system.
Go to file
2016-02-04 20:24:57 +01:00
doc README.md updated (dtrace) and 1 new tested plugin 2016-02-04 17:27:53 +01:00
_zplugin dunload help message and completion 2016-02-04 16:44:03 +01:00
LICENSE License file (MIT) 2016-01-23 21:29:13 +01:00
README.md Updated README.md (third gif, about dtrace) 2016-02-04 20:24:57 +01:00
widget-list.zsh Fixed widget-list.zsh, included custom widgets 2016-02-04 10:09:08 +01:00
zplugin.zsh Keymap `main' substitution with other keymap is now being reverted 2016-02-04 19:39:04 +01:00

zew logo

Zplugin

Zplugin gives reports from plugin load. Plugins are no longer black boxes, report will tell what aliases, functions, bindkeys, Zle widgets, zstyles, completions, PATH and FPATH elements a plugin has set up. Supported is unloading of plugin and ability to list, uninstall, reinstall and selectively disable, enable plugin's completions. The system doesn't use $FPATH, it's kept clean!

Zplugin in action:

zplugin

Completion handling:

zplugin

Dtrace:

dtrace

Introduction

zplugin-refcard

Example use:

% . ~/github/zplugin/zplugin.zsh
% zplugin load zsh-users/zsh-syntax-highlighting
% zplugin load psprint/zsh-cmd-architect

Example plugin report:

% zpl report psprint/zsh-cmd-architect
Plugin report for psprint/zsh-cmd-architect
-------------------------------------------
Source zsh-cmd-architect.plugin.zsh
Autoload h-list
Autoload h-list-input
Autoload h-list-draw
Autoload zca
Autoload zca-usetty-wrapper
Autoload zca-widget
Zle -N zca-widget
Bindkey ^T zca-widget

Functions created:
h-list             h-list-draw
h-list-input       zca
zca-usetty-wrapper zca-widget

Options changed:
autolist     was unset
menucomplete was unset

PATH elements added:
/Users/sgniazdowski/github/zsh-cmd-architect/bin

FPATH elements added:
/Users/sgniazdowski/github/zsh-cmd-architect

Completions:
_xauth [disabled]

report example

Example plugin unload:

% zpl unload psprint/zsh-cmd-architect
Deleting function h-list
Deleting function h-list-draw
Deleting function h-list-input
Deleting function zca
Deleting function zca-usetty-wrapper
Deleting function zca-widget
Deleting bindkey ^T zca-widget
Setting option autolist
Setting option menucomplete
Removing PATH element /Users/sgniazdowski/github/zsh-cmd-architect/bin
Removing FPATH element /Users/sgniazdowski/github/zsh-cmd-architect
Unregistering plugin psprint/zsh-cmd-architect
Plugin's report saved to $LASTREPORT

unload example

Example csearch invocation (completion management):

# zplg csearch
[+] is installed, [-] uninstalled, [+-] partially installed
[+] _local/zplugin                  _zplugin
[-] benclark/parallels-zsh-plugin   _parallels
[+] mollifier/cd-gitroot            _cd-gitroot
[-] or17191/going_places            _favrm, _go
[-] psprint/zsh-cmd-architect       _xauth
[-] psprint/zsh-editing-workbench   _cp
[+] tevren/gitfast-zsh-plugin       _git

csearch example

Installation

Execute:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/psprint/zplugin/master/doc/install.sh)"

To update run the command again.

Zplugin will be installed into ~/.zplugin/bin. .zshrc will be updated with single line of code that will be added to the bottom (it will be sourcing zplugin.zsh for you). Completion will be available, for command zplugin and aliases zpl, zplg.

To manually install Zplugin clone the repo to e.g. ~/.zplugin/bin:

mkdir ~/.zplugin
git clone https://github.com/psprint/zplugin.git ~/.zplugin/bin

and source it from .zshrc:

source ~/.zplugin/bin/zplugin.zsh

After installing and reloading shell give Zplugin a quick try with zplugin help.

Usage

% zpl help
Usage:
-h|--help|help           - usage information
self-update              - updates Zplugin
load {plugin-name}       - load plugin
light {plugin-name}      - light plugin load, without reporting
unload {plugin-name}     - unload plugin
snippet [-f] {url}       - source file given via url (-f: force download, overwrite existing file)
update {plugin-name}     - update plugin (Git)
update-all               - update all plugins (Git)
status {plugin-name}     - status for plugin (Git)
status-all               - status for all plugins (Git)
report {plugin-name}     - show plugin's report
all-reports              - show all plugin reports
loaded|list [keyword]    - show what plugins are loaded (filter with `keyword')
clist|completions        - list completions in use
cdisable {cname}         - disable completion `cname'
cenable  {cname}         - enable completion `cname'
creinstall {plugin-name} - install completions for plugin
cuninstall {plugin-name} - uninstall completions for plugin
csearch                  - search for available completions from any plugin
compinit                 - refresh installed completions
dtrace|dstart            - start tracking what's going on in session
dstop                    - stop tracking what's going on in session
dunload                  - revert changes recorded between dstart and dstop
dreport                  - report what was going on in session
dclear                   - clear report of what was going on in session

To use themes created for Oh-My-Zsh you might want to first source the git library there:

zplugin snippet 'http://github.com/robbyrussell/oh-my-zsh/raw/master/lib/git.zsh'

IRC channel

Simply connect to chat.freenode.net:6697 (SSL) or chat.freenode.net:6667 and join #zplugin.

Following is a quick access via Webchat IRC