1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-16 02:40:08 +00:00
ohmyzsh/plugins/fnm/fnm.plugin.zsh
Žiga Šebenik d9ad99531f
feat(plugins): add fnm plugin (#9864)
Co-authored-by: Ziga Sebenik <ziga.sebenik@oryxgaming.com>
2021-07-23 12:39:51 +02:00

12 lines
372 B
Bash

# 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