as
Summary
Section titled “Summary”as'' changes how Zinit treats the loaded plugin or snippet — as a program added to
$PATH, as a completion file, or as null (no sourcing, no completions).
Syntax / Usage
Section titled “Syntax / Usage”zi ice as"program" # also: as"command"zi ice as"completion"zi ice as"null"Details
Section titled “Details”Three values are supported:
-
as"program"(aliasas"command"): the plugin directory (or the file selected bypick'') is added to$PATHinstead of being sourced. Usepick''to point at the specific binary when the repo contains multiple executables. -
as"completion": treats the plugin or snippet as a completion-only resource. Zinit looks for underscore-prefixed files (_*) and installs them as completions. Useful for single-file completion snippets. -
as"null": shorthand forpick"/dev/null" nocompletions. Disables both sourcing and completion installation. Handy when a plugin is used purely for its side-effects viaatclone''/atload''hooks, or when usingsbin''to expose binaries without sourcing anything.
Examples
Section titled “Examples”# Binary from GitHub Releases added to $PATHzi ice from"gh-r" as"program"zi light junegunn/fzf
# Single-file completion snippetzi ice as"completion"zi snippet OMZP::docker/_docker
# Load git extensions without sourcing anythingzi as'null' lucid sbin wait'1' for \ Fakerr/git-recall \ tj/git-extrasCaveats / Common Mistakes
Section titled “Caveats / Common Mistakes”as"program"andpick''are complementary:as"program"adds the directory to$PATH;pick''selects which file within that directory to expose.as"null"disables completions — addcompletionsice to re-enable them if needed.
See Also
Section titled “See Also”- pick
- from
- sbin
- nocompletions