Linux command
zinit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Load a plugin
zinit light [username/repository]
Load a plugin with reporting
zinit load [username/repository]
Install and load Oh-My-Zsh plugin
zinit snippet OMZ::plugins/[plugin]/[plugin].plugin.zsh
Load with Turbo mode
zinit ice wait lucid; zinit light [username/repository]
Load a completion
zinit ice as"completion"; zinit snippet [url]
Update all plugins
zinit update --all
Update a specific plugin
zinit update [username/repository]
List installed plugins
zinit list
说明
Zinit (formerly Zplugin) is a flexible and fast Zsh plugin manager that supports Oh-My-Zsh and Prezto plugins, Turbo mode for deferred loading, and multiple installation methods. It compiles plugins to bytecode for faster shell startup times. The key feature is Turbo mode, which loads plugins asynchronously after Zsh starts, dramatically reducing shell initialization time. Ice modifiers provide fine-grained control over how plugins are downloaded, compiled, and sourced. Zinit supports loading from GitHub, GitLab, Bitbucket, or arbitrary URLs. It can handle plugins, completions, scripts, and binary programs. The light command provides fast loading without tracking, while load enables full reporting capabilities. Configuration is typically placed in .zshrc after sourcing zinit. Plugins are stored in ~/.zinit/plugins/ by default, with compiled versions cached for performance.
参数
- light _plugin_
- Load a plugin in light mode without tracking/reporting (fast).
- load _plugin_
- Load a plugin with full tracking and reporting.
- snippet _url_
- Load a single file or snippet from a URL or Oh-My-Zsh/Prezto.
- ice _modifiers..._
- Set modifiers for the next zinit command (compile, wait, pick, etc.).
- update _plugin_|_--all_
- Update specified plugin or all plugins.
- delete _plugin_
- Remove a plugin.
- list
- List all loaded plugins.
- loaded
- Show currently loaded plugins.
- self-update
- Update zinit itself.
- compile _plugin_
- Compile plugin scripts for faster loading.
- uncompile _plugin_
- Remove compiled files.
- report _plugin_
- Show report for a loaded plugin.
- times
- Show loading times for plugins.
FAQ
What is the zinit command used for?
Zinit (formerly Zplugin) is a flexible and fast Zsh plugin manager that supports Oh-My-Zsh and Prezto plugins, Turbo mode for deferred loading, and multiple installation methods. It compiles plugins to bytecode for faster shell startup times. The key feature is Turbo mode, which loads plugins asynchronously after Zsh starts, dramatically reducing shell initialization time. Ice modifiers provide fine-grained control over how plugins are downloaded, compiled, and sourced. Zinit supports loading from GitHub, GitLab, Bitbucket, or arbitrary URLs. It can handle plugins, completions, scripts, and binary programs. The light command provides fast loading without tracking, while load enables full reporting capabilities. Configuration is typically placed in .zshrc after sourcing zinit. Plugins are stored in ~/.zinit/plugins/ by default, with compiled versions cached for performance.
How do I run a basic zinit example?
Run `zinit light [username/repository]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does light _plugin_ do in zinit?
Load a plugin in light mode without tracking/reporting (fast).