Automatically nvm use latest in new shell.

This commit is contained in:
Shawn Anderson 2023-11-07 11:39:11 -08:00
parent 0e746e0845
commit eaaa2ad59c
1 changed files with 13 additions and 0 deletions

View File

@ -14,3 +14,16 @@ source ~/.config/fish/config/programs.fish
set -gx GOPATH $HOME/go; set -gx GOROOT $HOME/.go; set -gx PATH $GOPATH/bin $PATH; # g-install: do NOT edit, see https://github.com/stefanmaric/g set -gx GOPATH $HOME/go; set -gx GOROOT $HOME/.go; set -gx PATH $GOPATH/bin $PATH; # g-install: do NOT edit, see https://github.com/stefanmaric/g
export PATH="$PATH:/home/ygg/.foundry/bin" export PATH="$PATH:/home/ygg/.foundry/bin"
# Automatically Load Latest Node Version from NVM
function nvm_use_latest --description 'Use latest Node.js version'
set -l latest_nvm_node (nvm list | grep -o 'v[0-9.]*' | sort -V | tail -n1)
if test -n "$latest_nvm_node"
nvm use $latest_nvm_node
else
echo "No Node.js version found in nvm."
end
end
nvm_use_latest >/dev/null ^&1