Unverified Commit d9ad9953 authored by Žiga Šebenik's avatar Žiga Šebenik Committed by GitHub
Browse files

feat(plugins): add fnm plugin (#9864)


Co-authored-by: default avatarZiga Sebenik <ziga.sebenik@oryxgaming.com>
parent dac3314c
# fnm plugin
This plugin adds autocompletion for [fnm](https://github.com/Schniz/fnm) - a Node.js version manager.
To use it, add `fnm` to the plugins array in your zshrc file:
```zsh
plugins=(... fnm)
```
# COMPLETION FUNCTION
if (( $+commands[fnm] )); then
if [[ ! -f $ZSH_CACHE_DIR/fnm_version ]] \
|| [[ "$(fnm --version)" != "$(< "$ZSH_CACHE_DIR/fnm_version")" ]] \
|| [[ ! -f $ZSH/plugins/fnm/_fnm ]]; then
fnm completions --shell=zsh > $ZSH/plugins/fnm/_fnm
fnm --version > $ZSH_CACHE_DIR/fnm_version
fi
autoload -Uz _fnm
_comps[fnm]=_fnm
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment