Zinit 4 extra features
September 20, 2023 · View on GitHub
Zinit 4 comes with the following features that are different from Zinit (@zdharma-continuum fork).
Ver. 4.0.8
-
each plugin has a separate function defined:
@[plugin-id]; so for example the pluginpsprint/xzmsghas a function@psprint/xzmsg; the function allows quick actions for all plugins, being:cd– change directory to plugin dir, ' -load– load the plugin,unload– unload plugin,update– update the plugin,status– show plugin status (↔ zinit statuus …),run– run a command in the plugin dir,dispose–rm -fron the plugin dir;
to run the action pass it as first argument of the plugin
@functionof your choice, e.g.:@psprint/xzmsg cd(in this example the shell will change CWD toxzmsgdirectory); presentation: -
each plugin (+ some other, distinct location) has a special alias (Zsh internal feature) of the form:
~[plugin-name]; so for examplepsprnit/xzmsghas~[psprint/xzmsg]defined, ponting to the plugin directory; you can use the~[…]alias in all commands, e.g.: forcd; the feature is called "dynamic directoies" in zsh documentation, -
the mentioned distinct location are:
~[zplug]– the plugin dir ($ZINIT[PLUGINS_DIR),~[zsnip]– the plugin dir ($ZINIT[SNIPPETS_DIR]),~[zcomp]– the completion dir ($ZINIT[COMPLETIONS_DIR),~[data]–~/.local/shareor$XDG_DATA_HOME, if set,~[cache]–~/.cacheor$XDG_CACHE_HOME, if set,~[cfg]– the same, but for$XDG_CONFIG_HOME,- many others, see the complete list after pressing TAB with cursor after:
~[…].
Ver. 4.0.3
-
AppImage distribution (release link),
-
action complete – press
Alt-Shift-AorAlt-Shift-Cto complete plugin names and ice modifiers at the command line; asciicast on action-complete9: -
themes – set
$ZITHEMEto one ofdefault,blue.goldandpastelto pick a color set to use forZinit 4messages:-
default theme:

-
blue theme:

-
gold theme:

-
-
new ice
build''which is equivalent of three other ices:null configure make'installand simply builds the project from sources, with support for autotools/CMake/Meson/Scons; the project will be installed to~/.z4(the default$ZPFX, which is cutomizable), see a presentation: