GitHub Shorthand Syntax
Summary
Section titled “Summary”Zinit accepts user/repo shorthand for GitHub plugins and supports branch/tag/commit pinning via the ver ice, keeping .zshrc concise.
Details
Section titled “Details”When a plugin spec contains a /, Zinit treats it as {github-user}/{repo-name} and constructs the clone URL as https://github.com/{user}/{repo}.git. No protocol or domain prefix is needed for GitHub.
Pinning a version: use the ver ice to specify a branch, tag, or commit SHA:
zinit ice ver"v1.2.3"zinit load some/repover"latest" (the default) always fetches the latest default branch.
Other hosts: use the from ice to clone from GitLab (gl), Bitbucket (bb), Notabug (nb), GitHub Releases (gh-r), or any full domain:
zinit ice from"gl"zinit load user/repo # clones from gitlab.com
zinit ice from"gh-r" as"program"zinit light junegunn/fzf # downloads latest GitHub Release binaryProtocol: defaults to https. Override with proto ice (e.g. proto"ssh").
Examples
Section titled “Examples”# Standard GitHub shorthandzinit light zsh-users/zsh-autosuggestions
# Specific tagzinit ice ver"v0.7.0"zinit light zsh-users/zsh-autosuggestions
# Specific branchzinit ice ver"develop"zinit light zdharma-continuum/fast-syntax-highlighting
# Binary release from GitHub Releaseszinit ice from"gh-r" as"program"zinit light junegunn/fzf
# GitLab repozinit ice from"gl"zinit load user/my-zsh-plugin
# Shallow clone to save bandwidthzinit ice depth"1"zinit light romkatv/powerlevel10k