unscope
Summary
Section titled “Summary”unscope lets you load plugins by short nicknames or unscoped names (without the user/ prefix) by resolving them against a curated static mapping or, with the ghapi ice, by querying the GitHub API ranked by stars.
Details
Section titled “Details”-
Problem it solves: Typing full
user/repoIDs for well-known plugins is verbose. unscope lets you writezinit load fzforzinit for zsh-autosuggestionsand have the full ID resolved automatically. -
Resolution order:
- Static mapping table (curated list of common short names → full IDs, see below)
- GitHub API query for
*/{name}sorted by forks (requiresghapiice; first tries ≥10 forks, then ≥2, then 0) - Resolved ID is stored on disk for future use without re-querying
-
New ice:
ghapi— enables the live GitHub API lookup for names not found in the static mapping; omit it to use only the static table
-
New subcommand:
zinit scope {name}— translates a short name or unscoped ID to its fulluser/repoform -
Static mapping highlights (selection):
bgn,bin-gem-node→zdharma-continuum/zinit-annex-bin-gem-noderust→zdharma-continuum/zinit-annex-rustpatch-dl→zdharma-continuum/zinit-annex-patch-dlsubmods→zdharma-continuum/zinit-annex-submodsf-sy-h,fsh→zdharma-continuum/fast-syntax-highlightingautosug,z-asug→zsh-users/zsh-autosuggestionsz-sy-h→zsh-users/zsh-syntax-highlightingfd,bat,exa→ their respective sharkdp/ogham reposnull→zdharma-continuum/null
-
Install (load early so preceding calls also benefit):
Terminal window zinit light-mode for zdharma-continuum/zinit-annex-unscope
Examples
Section titled “Examples”# Use a static short namezinit load fsh
# Use ghapi to resolve an unscoped name dynamicallyzinit ice ghapizinit load some-popular-plugin
# Check what a short name resolves tozinit scope bgn# → zdharma-continuum/zinit-annex-bin-gem-nodeCaveats / Common Mistakes
Section titled “Caveats / Common Mistakes”- Load this annex as early as possible in
.zshrc;zinitcalls before it is loaded will not have short names resolved. - The maintainers advise using fully-qualified plugin names for security: an API-resolved name is only as trustworthy as the GitHub search result. See the linked security issue in the source repo.
ghapilookups require network access at shell startup; avoid for latency-sensitive configurations.