mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2024-06-29 07:58:59 +02:00
Add FNM
This commit is contained in:
parent
09c2d8a743
commit
42edfcd609
|
@ -44,7 +44,6 @@ zstyle ':prezto:load' pmodule \
|
|||
'syntax-highlighting' \
|
||||
'fasd' \
|
||||
'autosuggestions' \
|
||||
'node'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
|
|
|
@ -44,3 +44,25 @@ export XDG_CACHE_HOME="$HOME/.cache"
|
|||
|
||||
# Disable command correction suggestions
|
||||
unsetopt correct
|
||||
|
||||
|
||||
# fnm (fast node manager)
|
||||
export PATH=/Users/hgreen/.fnm/current/bin:$PATH
|
||||
export FNM_MULTISHELL_PATH=/Users/hgreen/.fnm/current
|
||||
export FNM_DIR=/Users/hgreen/.fnm
|
||||
export FNM_NODE_DIST_MIRROR=https://nodejs.org/dist
|
||||
export FNM_LOGLEVEL=info
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
_fnm_autoload_hook () {
|
||||
if [[ -f .node-version && -r .node-version ]]; then
|
||||
echo "fnm: Found .node-version"
|
||||
fnm use
|
||||
elif [[ -f .nvmrc && -r .nvmrc ]]; then
|
||||
echo "fnm: Found .nvmrc"
|
||||
fnm use
|
||||
fi
|
||||
}
|
||||
|
||||
add-zsh-hook chpwd _fnm_autoload_hook \
|
||||
&& _fnm_autoload_hook
|
||||
|
|
Loading…
Reference in a new issue