Show & Tell: Batch-installing multiple gh-r binaries with sbin
Summary
Section titled “Summary”A pattern for replacing Homebrew with zinit for managing multiple CLI binaries from GitHub releases, using as"null" + sbin in a single turbo for block.
Details
Section titled “Details”Key points:
as"null"prevents zinit from trying to source the binary as a zsh plugin and disables completion auto-detectionsbin(fromzinit-annex-bin-gem-node) creates shims in$ZPFX/bin- Per-plugin
sbinvalues override the shared one for tools with non-standard binary paths wait"0a"defers to after the first prompt with the earliest possible delay
Examples
Section titled “Examples”zinit as"null" wait"0a" lucid light-mode from"gh-r" sbin for \ achannarasappa/ticker \ tarkah/tickrs \ jesseduffield/lazydocker \ jesseduffield/lazygit \ ekzhang/bore \ sbin"**/rg" BurntSushi/ripgrep \ sbin"**/fd" @sharkdp/fd \ sbin"**/bat" @sharkdp/bat \ sbin"**/delta" dandavison/delta \ sbin"bin/exa" ogham/exaFor tools that include completions in their release archives, add completions management:
# After the batch load, install completions for tools that bundle themzinit creinstall BurntSushi/ripgrep # installs _rgzinit creinstall @sharkdp/bat # installs _batzinit creinstall @sharkdp/fd # installs _fdRun zinit creinstall once interactively, or add it to atload per plugin in the for block.
See Also
Section titled “See Also”- ts-as-null-completions-override — why completions are missing with
as"null"and how to restore them