2021-07-23 03:39:51 -07:00
|
|
|
if (( $+commands[fnm] )); then
|
2021-09-15 09:18:25 -07:00
|
|
|
ver="$(fnm --version)"
|
|
|
|
ver_file="$ZSH_CACHE_DIR/fnm_version"
|
|
|
|
comp_file="$ZSH/plugins/fnm/_fnm"
|
|
|
|
|
|
|
|
if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then
|
|
|
|
fnm completions --shell=zsh >| "$comp_file"
|
|
|
|
echo "$ver" >| "$ver_file"
|
2021-07-23 03:39:51 -07:00
|
|
|
fi
|
2021-09-15 09:18:25 -07:00
|
|
|
|
|
|
|
declare -A _comps
|
2021-07-23 03:39:51 -07:00
|
|
|
autoload -Uz _fnm
|
|
|
|
_comps[fnm]=_fnm
|
2021-09-15 09:18:25 -07:00
|
|
|
|
|
|
|
unset ver ver_file comp_file
|
2021-07-23 03:39:51 -07:00
|
|
|
fi
|
|
|
|
|