Update nvm loading

master
Hektor Misplon 2021-08-31 14:28:09 +02:00
parent ac3c187818
commit defbf9bbf7
1 changed files with 5 additions and 10 deletions

13
.bashrc
View File

@ -39,15 +39,10 @@ export FZF_DEFAULT_OPTS='--height 38% --reverse --border --prompt="❭ " --point
export FZF_COMPLETION_OPTS='-x'
# Nvm
lazy_load_nvm() {
unset -f nvm node npm npx
export PATH=~/.nvm/versions/node/v14.16.0/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
}
nvm() { lazy_load_nvm nvm $@; }
node() { lazy_load_nvm node $@; }
npm() { lazy_load_nvm npm $@; }
npx() { lazy_load_nvm npx $@; }
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" --no-use
# Ellipsis when deep in directory
export PROMPT_DIRTRIM=2