25 KiB
Table of Contents generated with DocToc
Changelog
All notable changes to this project will be documented in this file.
-
21-01-2020
- A few tips for the project rename following the field reports (the issues created
by users):
- the
ZPLGMhash is nowZINIT, - the annexes are moved under zinit-zsh organization (it needs a logo, could you create one, if you're skilled in graphics?).
- the
- A few tips for the project rename following the field reports (the issues created
by users):
-
19-01-2020
- The name has been changed to Zinit based on the results of the poll.
- In general, you don't have to do anything after the name change.
- Only a run of
zinit update --allmight be necessary. - You might also want to rename your
zplugincalls inzshrctozinit. - Zinit will reuse
~/.zplugindirectory if it exists, otherwise it'll create~/.zinit.
-
15-01-2020
- There's a new function,
zpextract, which unpacks the given file. It supports many formats (notably alsodmgimages) – if there's a format that's unsupported please don't hesitate to make a request for it to be added. A few facts:- the function is available only at the time of the plugin/snippet installation,
- it's to be used within
atcloneandatpullices, - it has an optional
--moveoption which moves all the files from a subdirectory up one level, - one other option
--normprevents the archive from being deleted upon unpacking.
- snippets now aren't re-downloaded unless they're newer on the HTTP server; use
this with the
--normoption ofzpextractto prevent unnecessary updates; for example, the firefox-dev package uses this option for this purpose, - GitHub doesn't report proper
Last-ModifiedHTTP server for the files in the repositories so the feature doesn't yet work with such files.
- There's a new function,
-
13-12-2019
-
The packages have been disconnected from NPM registry and now live only on Zsh Packages organization. Publishing to NPM isn't needed.
-
There are two interesting packages, any-gem and any-node. They allow to install any Gem(s) or Node module(s) locally in a newly created plugin directory. For example:
zinit pack param='GEM -> rails' for any-gem zinit pack param='MOD -> doctoc' for any-node # To have the command in zshrc, add an id-as'' ice so that # Zinit knows that the package is already installed # (also: the Unicode arrow is allowed) zinit id-as=jekyll pack param='GEM → jekyll' for any-gemThe binaries will be exposed without altering the PATH via shims (Bin-Gem-Node annex is needed). Shims are correctly removed when deleting a plugin with
zinit delete ….
-
-
11-12-2019
- Zinit now supports installing special-Zsh NPM packages! Bye-bye the long and complex ice-lists! Check out the Wiki for an introductory document on the feature.
-
25-11-2019
-
A new subcommand
runthat executes a command in the given plugin's directory. It has an-loption that will reuse the previously provided plugin. So that it's possible to do:zplg run my/plugin ls zplg run -l cat \*.plugin.zsh zplg run -l pwd
-
-
07-11-2019
-
Added a prefix-char:
@that can be used before plugins if their name collides with one of the ice-names. For examplesharkdp/fdcollides with theshice (which causes the plugin to be loaded with the POSIXshemulation applied). To load it, do e.g.:zinit as"null" wait"2" lucid from"gh-r" for \ mv"exa* -> exa" sbin"exa" ogham/exa \ mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd \ sbin"fzf" junegunn/fzf-bini.e.: precede the plugin name with
@. Note:sbin''is an ice added by the z-a-bin-gem-node annex, it provides the command to the command line without altering$PATH.See the Zinit Wiki for more information on the for-syntax.
-
-
06-11-2019
-
A new syntax, called for-syntax. Example:
zinit as"program" atload'print Hi!' for \ atinit'print First!' zdharma/null \ atinit'print Second!' svn OMZ::plugins/gitThe output:
First! Hi! Second! Hi!And also:
% print -rl $path | egrep -i '(/git|null)' /root/.zinit/snippets/OMZ::plugins/git /root/.zinit/plugins/zdharma---nullTo load in light mode, use a new
light-modeice. More examples and information can be found on the Zinit Wiki.
-
-
03-11-2019
- A new value for the
as''ice –null. Specifyingas"null"is like specifyingpick"/dev/null" nocompletions, i.e.: it disables the sourcing of the default script file of a plugin or snippet and also disables the installation of completions.
- A new value for the
-
30-10-2019
-
A new ice
trigger-load''– create a function that loads given plugin/snippet, with an option (to use it, precede the ice content with!) to automatically forward the call afterwards. Example use:# Invoking the command `crasis' will load the plugin that # provides the function `crasis', and it will be then # immediately invoked with the same arguments zinit ice trigger-load'!crasis' zinit load zdharma/zinit-crasis
-
-
22-10-2019
- A new ice
countdown– causes an interruptable (by Ctrl-C) countdown 5…4…3…2…1…0 to be displayed before running theatclone'',atpull''andmakeices.
- A new ice
-
21-10-2019
- The
timescommand has a new option-m– it shows the moments of the plugin load times – i.e.: how late after loading Zinit a plugin has been loaded.
- The
-
20-10-2019
- The
zinitcompletion now completes also snippets! The commandsnippet, but alsodelete,recall,edit,cd, etc. all receive such completing. - The
icesubcommand can now be skipped – just pass in the ices, e.g.:zinit atload"zicompinit; zicdreplay" blockf zinit light zsh-users/zsh-completions - The
compilecommand is able to compile snippets. - The plugins that add their subdirectories into
$fpathcan be nowblockf-ed – the functions located in the dirs will be correctly auto-loaded.
- The
-
12-10-2019
-
Special value for the
id-as''ice –auto. It sets the plugin/snippet ID automatically to the last component of its spec, e.g.:zinit ice id-as"auto" zinit load robobenklein/zincwill load the plugin as
id-as'zinc'.
-
-
14-09-2019
- There's a Vim plugin which extends syntax highlighting of zsh scripts with coloring of the Zinit commands. Project homepage.
-
13-09-2019
- New ice
aliaseswhich loads plugin with the aliases mechanism enabled. Use for plugins that define and use aliases in their scripts.
- New ice
-
11-09-2019
-
New ice-mods
sh,bash,ksh,cshthat load plugins (and snippets) with the sticky emulation feature of Zsh – all functions defined within the plugin will automatically switch to the desired emulation mode before executing and switch back thereafter. In other words it is now possible to load e.g. bash plugins with Zinit, provided that the emulation level done by Zsh is sufficient, e.g.:zinit ice bash pick"bash_it.sh" \ atinit"BASH_IT=${ZINIT[PLUGINS_DIR]}/Bash-it---bash-it" \ atclone"yes n | ./install.sh" zinit load Bash-it/bash-itThis script loads correctly thanks to the emulation, however it isn't functional because it uses
type -t …to check if a function exists.
-
-
10-09-2019
-
A new ice-mod
reset''that ivokesgit reset --hard(or the provided command) beforegit pullandatpull''ice. It can be used it to implement altering (i.e. patching) of the plugin's files inside theatpull''ice –gitwill report no conflicts when doingpull, and the changes can be then again introduced by theatpull''ice.. -
Three new Zplugin annexes (i.e. extensions):
-
Generates man pages and code-documentation man pages from plugin's README.md and source files (the code documentation is obtained from Zshelldoc).
-
Runs tests (if detected
test' target in aMakefileor any*.zunit` files) on plugin installation and non-empty update. -
Allows easy download and applying of patches, to e.g. aid building a binary program equipped in the plugin.
-
-
A new variable is being recognized by the installation script:
$ZPLG_BIN_DIR_NAME. It configures the directory within$ZPLG_HOMEto which Zplugin should be cloned.
-
-
09-08-2019
- A new ice-mod
wrap-track''which gets;-separated list of functions that are to be tracked once when executing. In other words you can extend the tracking beyond the moment of loading of a plugin. - The unloading of Zle widgets is now more smart – it takes into account the chains of plugins that can overload the Zle widgets, and solves the interactions that result out of it.
- A new ice-mod
-
29-07-2019
deletenow supports following options:--all– deletes all plugins and snippets (a purge, similar torm -rf ${ZPLGM[PLUGINS_DIR]} ${ZPLGM[SNIPPETS_DIR]})--clean– deletes only plugins and snippets that are currently not loaded in the current session.
-
09-07-2019
- Zplugin can now have its own plugins, called z-plugins! Check out an example but fully functional z-plugin zdharma/z-p-submods and a document that explains on how to implement your own z-plugin (here).
-
08-07-2019
- You can now do
zplugin ice wait ...and it will work aszplugin ice wait'0' ...:) I.e. when there's no value to thewait''ice then a value of0is being substituted.
- You can now do
-
02-07-2019
- Cooperation of Fast-Syntax-Highlighting and Zplugin – a new precise highlighting for Zplugin in F-Sy-H.
-
01-07-2019
atclone'',atpull''&make''get run in the same subshell, thus an e.g. export done inatclone''will be visible during themake.
-
26-06-2019
notify''contents gets evaluated, i.e. can contain active code like$(tail -1 /var/log/messages), etc.
-
23-06-2019
-
New ice mod
subscribe''/on-update-of''which works like thewait''ice-mod, i.e. defers loading of a plugin, but it looks at modification time of the given file(s), and when it changes, it then triggers loading of the plugin/snippet:% zplugin ice on-update-of'{~/files-*,/tmp/files-*}' lucid \ atload"echo I have been loaded" \ notify"Yes that's true :)" % zplugin load zdharma/null % touch ~/files-1 The plugin has been loaded % Yes that's true :)The plugin/snippet will be sourced as many times as the file gets updated.
-
-
22-06-2019
-
New ice mod
reset-promptthat will issuezle .reset-promptafter loading the plugin or snippet, causing the prompt to be recomputed. Useful with themes & turbo-mode. -
New ice-mod
notify''which will cause to display an under-prompt notification when the plugin or snippet gets loaded. E.g.:% zplugin ice wait"0" lucid notify"zdharma/null has been loaded" % zplugin light zdharma/null % zdharma/null has been loadedIn case of problems with the loading a warning message will be output:
% zplugin ice notify atload'return 7' % zplugin light zdharma/null % notify: Plugin not loaded / loaded with problem, the return code: 7Refer to Ice Modifiers section for a complete description.
-
-
29-05-2019
-
Turbo-Mode, i.e. the
wait''ice-mode now supports a suffix – the lettera,borc. The meaning is illustrated by the following example:zplugin ice wait"0b" as"command" pick"wd.sh" atinit"echo Firing 1" lucid zplugin light mfaerevaag/wd zplugin ice wait"0a" as"command" pick"wd.sh" atinit"echo Firing 2" lucid zplugin light mfaerevaag/wd # The output Firing 2 Firing 1As it can be seen, the second plugin has been loaded first. That's because there are now three sub-slots (the
a,bandc) in which the plugin/snippet loadings can be put into. Plugins from the same time-slot with suffixawill be loaded before plugins with suffixb, etc.In other words, instead of
wait'1'you can enterwait'1a',wait'1b'andwait'1c'– to this way impose order on the loadings regardless of the order ofzplugincommands.
-
-
26-05-2019
- Turbo-Mode now divides the scheduled events (i.e. loadings of plugins or snippets) into packs of 5. In other words, after loading each series of 5 plugins or snippets the prompt is activated, i.e. it is feed an amount of CPU time. This will help to deliver the promise of background loading without interferences visible to the user. If you have some two slow-loading plugins and/or snippets, you can put them into some separate blocks of 5 events.
-
18-05-2019
- New ice-mod
nocd– it prevents changing current directory into the plugin's directory before evaluatingatinit'',atload''etc. ice-mods.
- New ice-mod
-
12-03-2019
- Finally reorganizing the
README.md. Went on asciidoc path, the side-documents are written in it and theREADME.mdwill also be converted (example page: Introduction)
- Finally reorganizing the
-
12-10-2018
- New
id-as''ice-mod. You can nickname a plugin or snippet, to e.g. load it twice, with differentpick''ice-mod, or from Github binary releases and regular Github repository at the same time. More information in blog post.
- New
-
30-08-2018
-
New
as''ice-mod value:completion. Can be used to install completion-only "plugins", even single files:zplugin ice as"completion" mv"hub* -> _hub" zplugin snippet https://github.com/github/hub/blob/master/etc/hub.zsh_completion -
Uplift of Git-output, it now has an animated progress-bar:
-
-
15-08-2018
- New
$ZPLGMfieldCOMPINIT_OPTS(also see Customizing Paths). You can pass-Cor-ithere to mute theinsecure directoriesmessages. Typical use case could be:zplugin ice wait"5" atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" lucid zplugin light zdharma/fast-syntax-highlighting
- New
-
13-08-2018
-
25-07-2018
- If you encountered a problem with loading Turbo-Mode plugins, it is fixed now. This occurred in versions
available between
10and23of July. Issuezplugin self-updateif you installed/updated in this period. - New bug-fix release
v2.07.
- If you encountered a problem with loading Turbo-Mode plugins, it is fixed now. This occurred in versions
available between
-
13-07-2018
- New
multisrc''ice, it allows to specify multiple files for sourcing and it uses brace expansion syntax, so for example you can:zplugin ice depth"1" multisrc="lib/{functions,misc}.zsh" pick"/dev/null"; zplugin load robbyrussell/oh-my-zsh zplugin ice svn multisrc"{functions,misc}.zsh" pick"/dev/null"; zplugin snippet OMZ::lib array=( {functions,misc}.zsh ); zplg ice svn multisrc"\${array[@]}" pick"/dev/null"; zplugin snippet OMZ::lib array=( {functions,misc}.zsh ); zplg ice svn multisrc"${array[@]}" pick"/dev/null"; zplugin snippet OMZ::lib array=( {functions,misc}.zsh ); zplg ice svn multisrc"\$array" pick"/dev/null"; zplugin snippet OMZ::lib array=( {functions,misc}.zsh ); zplg ice svn multisrc"$array" pick"/dev/null"; zplugin snippet OMZ::lib zplugin ice svn multisrc"misc.zsh functions.zsh" pick"/dev/null"; zplugin snippet OMZ::lib
- New
-
12-07-2018
-
For docker and new machine provisioning, there's a trick that allows to install all turbo-mode plugins by scripting:
zsh -i -c -- '-zplg-scheduler burst'
-
-
10-07-2018
- Ice
wait'0'now means actually short time – you can load plugins and snippets very quickly after prompt.
- Ice
-
02-03-2018
- Zplugin exports
$ZPFXparameter. Its default value is~/.zplugin/polaris(user can override it before sourcing Zplugin). This directory is like/usr/local, a prefix for installed software, so it's possible to use ice likemake"PREFIX=$ZPFX"oratclone"./configure --prefix=$ZPFX". Zplugin also setups$MANPATHpointing to thepolarisdirectory. Checkout gallery for examples. - New README section about extending Git with Zplugin.
- Zplugin exports
-
05-02-2018
- I work much on this README however multi-file Wiki might be better to read – it just has been created.
-
16-01-2018
- New ice-mod
compilewhich takes pattern to select additional files to compile, e.g.zplugin ice compile"(hsmw-*|history-*)"(forzdharma/history-search-multi-wordplugin). See Ice Modifiers.
- New ice-mod
-
14-01-2018
- Two functions have been exposed:
zpcdreplayandzpcompinit. First one invokes compdef-replay, second one is equal toautoload compinit; compinit(it also respects$ZPLGM[ZCOMPDUMP_PATH]). You can use e.g.atinit'zpcompinit'ice-mod in a syntax-highlighting plugin, to initialize completion right-before setting up syntax highlighting (because that should be done at the end).
- Two functions have been exposed:
-
13-01-2018
- New customizable path
$ZPLGM[ZCOMPDUMP_PATH]that allows to point zplugin to non-standard.zcompdumplocation. - Tilde-expansion is now performed on the customizable paths – you can
assign paths like
~/.zplugin, there's no need to use$HOME/.zplugin.
- New customizable path
-
31-12-2017
-
For the new year there's a new feature: user-services spawned by Zshell :) Check out available services. They are configured like their READMEs say, and controlled via:
% zplugin srv redis next # current serving shell will drop the service, next Zshell will pick it up % zplugin srv redis quit # the serving shell will quit managing the service, next Zshell will pick it up % zplugin srv redis stop # stop serving, do not pass it to any shell, just hold the service % zplugin srv redis start # start stopped service, without changing the serving shell % zplugin srv redis restart # restart service, without changing the serving shellThis feature allows to configure everything in
.zshrc, without the the need to deal withsystemdorlaunchd, and can be useful e.g. to configure shared-variables (across Zshells), stored inredisdatabase (details on zservices/redis).
-
-
24-12-2017
- Xmas present – fast-syntax-highlighting
now highlights the quoted part in
atinit"echo Initializing", i.e. it supports ICE syntax :)
- Xmas present – fast-syntax-highlighting
now highlights the quoted part in
-
08-12-2017
- SVN snippets are compiled on install and update
- Resolved how should ice-mods be remembered – general rule is that using
zplugin ice ...makes memory-saved and disk-saved ice-mods not used, and replaced on update. Calling e.g.zplugin update ...without precedingiceuses memory, then disk-saved ices.
-
07-12-2017
- New subcommand
deletethat obtains plugin-spec or URL and deletes plugin or snippet from disk. It's good to forget wrongly passed Ice-mods (which are storred on disk e.g. forupdate --all).
- New subcommand
-
04-12-2017
- It's possible to set plugin loading and unloading on condition. ZPlugin supports plugin unloading, so it's possible to e.g. unload prompt and load another one, on e.g. directory change. Checkout full story and Asciinema video.
-
29-11-2017
- Turbo Mode – 39-50% or more faster Zsh startup!
- Subcommand
updatecan update snippets, via given URL (up to this point snippets were updated viazplugin update --all). - Completion management is enabled for snippets (not only plugins).
-
13-11-2017
-
New ice modifier –
make. It causes themake-command to be executed after cloning or updating plugins and snippets. For example there'sZshelldocthat usesMakefileto build final scripts:zplugin ice as"program" pick"build/zsd*" make; zplugin light zdharma/zshelldocThe above doesn't trigger the
installtarget, but this does:zplugin ice as"program" pick"build/zsd*" make"install PREFIX=/tmp"; zplugin light zdharma/zshelldoc -
Fixed problem with binary-release selection (
from"gh-r") by adding Ice-modbpick, which should be used for this purpose instead ofpick, which selects file within plugin tree.
-
-
06-11-2017
- The subcommand
clistnow prints3completions per line (not1). This makes large amount of completions to look better. Argument can be given, e.g.6, to increase the grouping. - New Ice-mod
silentthat mutesstderr&stdoutof a plugin or snippet.
- The subcommand
-
04-11-2017
- New subcommand
lswhich lists snippets-directory in a formatted and colorized manner. Example:
- New subcommand
-
29-10-2017
-
Subversion protocol (supported by Github) can be used to clone subdirectories when using snippets. This allows to load multi-file snippets. For example:
zstyle ':prezto:module:prompt' theme smiley zplugin ice svn silent; zplugin snippet PZT::modules/prompt -
Snippets support
Preztomodules (with dependencies), and can use PZT:: URL-shorthand, like in the example above. One can loadPreztomodule as single file snippet, or use Subversion to download whole directory (see also description of Ice Modifiers):# Single file snippet, URL points to file zplg snippet PZT::modules/helper/init.zsh # Multi-file snippet, URL points to directory to clone with Subversion # The file to source (init.zsh) is automatically detected zplugin ice svn; zplugin snippet PZT::modules/prompt # Use of Subversion to load an OMZ plugin zplugin ice svn; zplugin snippet OMZ::plugins/git -
Fixed a bug with
cURLusage (snippets) for downloading, it will now be properly used
-
-
13-10-2017
-
Snippets can use "OMZ::" prefix to easily point to
Oh-My-Zshplugins and libraries, e.g.:zplugin snippet OMZ::lib/git.zsh zplugin snippet OMZ::plugins/git/git.plugin.zsh
-
-
12-10-2017
-
The
cdsubcommand can now obtain URL and move session to snippet directory -
The
timessubcommand now includes statistics on snippets. Also, entries are displayed in order of loading:% zplugin times Plugin loading times: 0.010 sec - OMZ::lib/git.zsh 0.001 sec - OMZ::plugins/git/git.plugin.zsh 0.003 sec - zdharma/history-search-multi-word 0.003 sec - rimraf/k 0.003 sec - zsh-users/zsh-autosuggestions
-
-
24-09-2017
- Code documentation for contributors and interested people.
-
13-06-2017
-
Plugins can now be absolute paths:
zplugin load %HOME/github/{directory} zplugin load /Users/sgniazdowski/github/{directory} zplugin load %/Users/sgniazdowski/github/{directory}Completions are not automatically installed, but user can run
zplg creinstall %HOME/github/{directory}, etc.
-
-
23-05-2017
-
New
icemodifier:if, to which you can provide a conditional expression:% zplugin ice if"(( 0 ))" % zplugin snippet --command https://github.com/b4b4r07/httpstat/blob/master/httpstat.sh % zplugin ice if"(( 1 ))" % zplugin snippet --command https://github.com/b4b4r07/httpstat/blob/master/httpstat.sh Setting up snippet httpstat.sh Downloading httpstat.sh...
-


