Plugin Reports and Session Tracking
Summary
Section titled “Summary”zinit report tracks everything a plugin modifies — aliases, functions, bindkeys, completions, variables, $PATH/$FPATH — and zinit times shows per-plugin load durations, making it easy to audit and debug a plugin setup.
Details
Section titled “Details”When a plugin is loaded with zinit load (not zinit light), Zinit enters investigation mode and records all changes the plugin makes to the shell environment:
- Aliases defined/modified
- Functions defined
- Bindkeys registered (
bindkeycalls) - Zle widgets created
- Zstyles set
- Completions installed
- Variables set
$PATHand$FPATHentries added
This data is stored per-plugin and can be retrieved at any time with zinit report {plugin} or zinit report --all. It is also used by zinit unload to undo a plugin’s effects.
Session tracking (dtrace/dstart, dstop, dreport, dunload) works similarly but for interactive commands run in the current shell session rather than for a specific plugin.
Load times are available via zinit times [-s] [-m] [-a]:
-s— display times in seconds-m— show the moment each plugin was loaded (wall-clock time from shell start)-a— show both times and loading moments
Statistics overview: zinit zstatus prints a brief summary of the Zinit installation (version, plugin count, etc.).
Other reporting commands:
zinit list-plugins [keyword]— list loaded plugins, optionally filtered.zinit list-snippets— list cached snippets (requirestree).zinit recently [time-spec]— show plugins updated recently (e.g.zinit recently 1 week).zinit status {plg-spec}— git status for a plugin or svn status for a snippet.zinit bindkeys— show bindkeys registered by all plugins.
Examples
Section titled “Examples”# Load with full reporting enabledzinit load zdharma-continuum/history-search-multi-word
# View the reportzinit report zdharma-continuum/history-search-multi-word
# View reports for all pluginszinit report --all
# See load timeszinit times
# Show times in seconds with loading momentszinit times -s -m
# Trace an interactive sessionzinit dtrace# ... run some commands ...zinit dstopzinit dreport
# Unload a plugin (reverting its environment changes)zinit unload zdharma-continuum/history-search-multi-wordCaveats / Common Mistakes
Section titled “Caveats / Common Mistakes”zinit lightloads a plugin without any investigation, sozinit reportwill show no data for it andzinit unloadwill not work.zinit unloadcan only revert changes that were recorded duringload; changes made by external processes or the interactive session itself are not tracked.