Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Announcement of Zplugin ver. 300 commits



Hello,
nearly 300 commits have been added to Zplugin. The project is about
tracing what plugins do. An answer to injecting naive *.plugin.zsh
code into session. The feature base is very large, but one example can
say much:

to use Oh-My-Zsh sessions, one needs their libs/git.zsh. Snippet
feature allows to source that code:

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

Now it's possible to load most of OMZ themes. However, what has
actually happened during the source? The feature, Dtrace, allows to
tell:
https://asciinema.org/a/79tig2hyjq61r6o3ww7hl5uti

% zplg dtrace
% zplugin snippet
http://github.com/robbyrussell/oh-my-zsh/raw/master/lib/git.zsh
% zplg dstop
% zplg dreport
Plugin report for _dtrace/_dtrace
---------------------------------

Functions created:
git_commits_ahead git_current_branch
git_prompt_ahead  git_prompt_behind
git_prompt_info   git_prompt_long_sha
git_prompt_remote git_prompt_short_sha
git_prompt_status git_remote_status
parse_git_dirty

Variables added or redefined:
POST_1_7_2_GIT  [     "" -> scalar ]

% zplg dunload
Deleting function git_commits_ahead
Deleting function git_current_branch
Deleting function git_prompt_ahead
Deleting function git_prompt_behind
Deleting function git_prompt_info
Deleting function git_prompt_long_sha
Deleting function git_prompt_remote
Deleting function git_prompt_short_sha
Deleting function git_prompt_status
Deleting function git_remote_status
Deleting function parse_git_dirty
Unsetting variable POST_1_7_2_GIT
dtrace report saved to $LASTREPORT


That's what Zplugin does. Tracks and reports, and unloads – zstyles,
bindkeys, aliases, zle widgets, PATH and FPATH elements, options,
variables. Plugins are tracked without Dtrace, it's their standard
mode of operation, unless "light" load is done, provided for trusted
code loading (like z-sy-h ;) and saving few CPU cycles. Naive code
cannot survive Zplugin eyes, hopefully. Tested 43 plugins and few OMZ
themes (some of them don't work because they use git _plugin_, that's
OMZ issue that they don't provide enough in lib/git.zsh).

https://github.com/psprint/zplugin

Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author