fnm
Summary
Section titled “Summary”Installs fnm (Fast Node Manager) from a GitHub release binary, generates its Zsh completion, and activates the fnm environment on shell startup.
Syntax / Usage
Section titled “Syntax / Usage”zinit for \ as'completion' \ atclone"./fnm completions --shell zsh > _fnm.zsh" \ atload'eval $(fnm env --shell zsh)' \ atpull'%atclone' \ blockf \ from'gh-r' \ nocompile \ sbin'fnm' \ @Schniz/fnmDetails
Section titled “Details”from'gh-r'— downloads the release binary from GitHub Releases.as'completion'— marks the plugin as providing a completion file.atclone"./fnm completions --shell zsh > _fnm.zsh"— generates the Zsh completion file after initial download.atpull'%atclone'— regenerates the completion file on every update.atload'eval $(fnm env --shell zsh)'— runsfnm envto configure the Node.js environment (setsPATH,FNM_DIR, etc.) after the plugin loads.blockf— prevents fnm from adding its own entries to$fpath; Zinit manages completions.nocompile— skips compilation of the completion file.sbin'fnm'— creates a shim for thefnmbinary (requireszinit-annex-bin-gem-node).
The annex zdharma-continuum/zinit-annex-bin-gem-node must be loaded before this recipe.
Examples
Section titled “Examples”# prerequisite — load once at the top of .zshrczinit light-mode for zdharma-continuum/zinit-annex-bin-gem-node
zinit for \ as'completion' \ atclone"./fnm completions --shell zsh > _fnm.zsh" \ atload'eval $(fnm env --shell zsh)' \ atpull'%atclone' \ blockf \ from'gh-r' \ nocompile \ sbin'fnm' \ @Schniz/fnm