跳到主要内容

🌀 元插件组

附件会自动应用经过优化的 ice-modifiers 列表。 更多详情,请参阅 z-a-meta-plugins.plugin.zsh 文件。

提示
  • 要创建一组元插件组,请在新的 issue 中提出。
  • 前缀 @ 用于避免语法冲突,例如: zi light @<meta-plugin-name>
  • 在安装任何插件之前,请访问原始存储库,以验证该系统是否受支持并满足其他需求

元插件组的使用

以下片段是如何安装元插件组的示例:

zi light @annexes
zi light-mode for @annexes @zsh-users @console-tools
zi light-mode for z-a-meta-plugins \
@annexes @ext-git @zsh-users
zi light-mode for @annexes \
skip'zsh-completions' @zsh-users \
skip'vivid exa tig' @console-tools

可用的元插件组

Meta-plugin nameConsisting plugins
@annexesbin-gem-node, readurl, patch-dl, rust, default-ice, unscope
@annexes+@annexes + submods, test
@console-toolsdircolors-material (package), fd, bat, hexyl, hyperfine, vivid, exa, ripgrep, tig
@developer-toolscolor, revolver, zunit, gitignore.plugin.zsh, tig
@ext-gitgit-open, git-recent, git-my, git-quick-stats, git-now, git-extras, forgit
@fuzzyfzf (package), fzy (package), skim, peco
@fuzzy-srcfzf-go, fzy, skim-cargo, peco-go
@preztoPZTM::archive, PZTM::directory, PZTM::utility
@py-utilspyenv (package)
@romkatvpowerlevel10k
@rust-utilsrust-toolchain, cargo-extensions
@sharkdpfd, bat, hexyl, hyperfine, vivid
@z-shellF-Sy-H, H-S-MW, zsh-diff-so-fancy
@z-shell+zsh-select, zconvey, zui, zflai
@zsh-userszsh-syntax-highlighting, zsh-autosuggestions, zsh-completions
@zsh-users+fastF-Sy-H, zsh-autosuggestions, zsh-completions, z-shell/zsh-fancy-completions
@zunitcolor, revolver, zunit

元插件组概述

It consumes time to:

  • 不断地、反复地收集一些新的有趣插件来安装/加载。
  • 一遍又一遍地在新机器上重建新发现。
  • 不断扩大和调整每个插件的ice list,使其不那么难以看懂,尤其是对于入门者而言。
问题解决方案
(1) 寻找新插件该附件包含一个经过整理的、范围广泛的插件列表,例如:所有控制台工具,如 fdfzfexaripgrep 等、
(2) reconstructing the findings in new environmentsIt's easy to say and memorize e.g.: zi for console-tools – one label pulls a group of plugins and also the curated, optimal, default ice lists for each of them,
(3) constant increase of complexity of the commandsThe provided, hopefully, best/optimal ices for each plugin are handled transparently and automatically; care is given to each ice list so that the plugin loads without any glitches (e.g.: without the "No files for compilation found." message and other, even such slight issues).

Other unique benefits of the meta-plugins annex:

BenefitDescription
Plugin dependenciesThe meta-plugins implement a dependency mechanism: selecting a from-source built ogham/exa will automatically pull in also the Rust compiler (available under the meta-plugin name: rust-toolchain).
Flexible disabling of chosen sub-plugins in any meta-pluginA meta-plugin can contain many sub-plugins and it's possible to skip installing some of them by the skip'plugin-1 plugin-2…' ice, e.g.: zi skip'ripgrep fd' for console-tools. This way despite that some of the meta plugins are broad the user still has control over what's and how much is being installed.
Common from-source meta pluginsFor the plugins that provide the binary programs it is often the case that a meta-plugin exists that'll build the program from the source (e.g.: fuzzy meta-plugin and its fuzzy-src counterpart). This might be handy e.g.: if there's no binary for our machine.

安装元插件组

Add the following snippet in the .zshrc file:

zi light z-shell/z-a-meta-plugins

This will register the skip'…' ice-modifier.