跳到主要内容

🌀 Unscope

An annex allows the installation of plugins without specifying the GitHub user name, as follows:

  1. On the installation of a plugin without any slashes (/) in its name the annex will query the GitHub API searching for */{the-name}, sorting on stars.

  2. It first requires at least 10 forks on the candidates, then 2, then 0.

  3. After finding the best result it sets it as the full remote-id of the plugin, storing the ID on disk for later automatic use.

  4. For security, for such GH-API request to be made a newly added (by this annex) ice: ghapi is required to be given.

  5. Otherwise only the static database of mappings of short-plugin nicknames to the full scoped IDs will be searched. It contains many mappings, like, e.g.: vi-reg → zsh-vi-more/evil-registers, and some of the popular plugins, like, e.g.: zsh-syntax-highlighting → zsh-users/zsh-syntax-highlighting and more.

Static mappings​

信息

Fill request to add new repositories with scoped IDs.

Besides the GitHub-API querying, there's also a fixed, curated list of mappings of short names to the full GitHub IDs:

null z-shell/null
Short (Nick-) NameGitHub ID / scoped ID

Install unscope​

Add the following snippet in the .zshrc file:

zi light z-shell/z-a-unscope

This will allow scoped IDs to be searched and resolved.