Author: "A Zinit-Zsh annex that allows users to install plugins without specifying the GitHub user name."
Go to file
2020-07-16 20:29:21 +02:00
images unscope-scope-cmd.png, unscope-zinit-for.png 2020-07-10 12:58:29 +02:00
.gitignore .gitignore 2020-07-10 10:24:23 +02:00
.za-scope-dynamic Use the {term} color. 2020-07-10 12:26:10 +02:00
.za-unscope-list-mappings Output header / --list. 2020-07-10 10:25:00 +02:00
ghquery Increase conformance with the Plugin Standard. 2020-07-10 20:44:36 +02:00
LICENSE Initial commit 2020-07-08 20:56:24 +02:00
README.md README.md 2020-07-10 13:40:59 +02:00
z-a-unscope.plugin.zsh New mappings. 2020-07-14 12:33:25 +02:00
∧za-unscope-before-load-handler Cleanup on the message showing. 2020-07-16 20:29:21 +02:00
∧za-unscope-scope-cmd Cleanup on the message showing. 2020-07-16 20:29:21 +02:00
∧za-unscope-scope-cmd-help-handler Fix the help. 2020-07-10 09:26:41 +02:00

z-a-unscope

A Zinit-Zsh annex that allows to install plugins without specifying the GitHub user name. It works 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.

Usage Examples

  1. An example installation via 2 nicknames (env and vi-reg) and by one unscoped (i.e.: not using any GitHub username) ID that's being dynamically resolved by a request to GitHub API:

zinit-for-command

  1. An example call to the zinit scope … subcommand that is added by this annex. It allows to translate the unscoped IDs and the short-static nicknames into the full username/repository plugin ID.

scope-subcommand

Static Mappings

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

Short (Nick-) Name GitHub ID
null zdharma/null
as-monitor zinit-zsh/z-a-as-monitor
monitor zinit-zsh/z-a-as-monitor
patch-dl zinit-zsh/z-a-patch-dl
rust zinit-zsh/z-a-rust
bin-gem-node zinit-zsh/z-a-bin-gem-node
bgn zinit-zsh/z-a-bin-gem-node
console zinit-zsh/zinit-console
consolette zinit-zsh/zinit-console
archive PZTM::archive 1
arch PZTM::archive 1
directory PZTM::directory 1
dir PZTM::directory 1
environment PZTM::environment 1
env PZTM::environment 1
utility PZTM::utility 1
util PZTM::utility 1
f-sy-h zdharma/fast-syntax-highlighting
fsh zdharma/fast-syntax-highlighting
hsmw zdharma/history-search-multi-word
zui zdharma/zui
ZUI zdharma/zui
zconv zdharma/zconvey
zbrowse zdharma/zbrowse
zzcomp zdharma/zzcomplete
zzcom zdharma/zzcomplete
autosuggestions zsh-users/zsh-autosuggestions
autosug zsh-users/zsh-autosuggestions
asug zsh-users/zsh-autosuggestions
z-asug zsh-users/zsh-autosuggestions
z-sy-h zsh-users/zsh-syntax-highlighting
autocomplete marlonrichert/zsh-autocomplete
autocomp marlonrichert/zsh-autocomplete
aucom marlonrichert/zsh-autocomplete
acom marlonrichert/zsh-autocomplete
z-aucom marlonrichert/zsh-autocomplete
z-acom marlonrichert/zsh-autocomplete
autopair hlissner/zsh-autopair
aupair hlissner/zsh-autopair
aupa hlissner/zsh-autopair
z-aupa hlissner/zsh-autopair
evil-reg zsh-vi-more/evil-registers
vi-reg zsh-vi-more/evil-registers
vireg zsh-vi-more/evil-registers
evil-mot zsh-vi-more/vi-motions
vi-mot zsh-vi-more/vi-motions
vimot zsh-vi-more/vi-motions
evil-inc zsh-vi-more/vi-increment
vi-inc zsh-vi-more/vi-increment
viinc zsh-vi-more/vi-increment
evil-qte zsh-vi-more/vi-quote
vi-qte zsh-vi-more/vi-quote
viqte zsh-vi-more/vi-quote
evil-dir-marks zsh-vi-more/directory-marks
vi-dir-marks zsh-vi-more/directory-marks
vi-dirma zsh-vi-more/directory-marks
vidirma zsh-vi-more/directory-marks

You can let me know if you would like a name to be added to the list.

Installation

Simply load as a regular plugin, i.e.:

zinit light-mode for zinit-zsh/z-a-unscope

It should be done possibly early in the zshrc, as otherwise the preceding zinit calls will not have the unscoped IDs resolved.