···11+function load_nvm --on-variable="PWD"
22+ set -l default_node_version (nvm version default)
33+ set -l node_version (nvm version)
44+ set -l nvmrc_path (nvm_find_nvmrc)
55+ if test -n "$nvmrc_path"
66+ set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
77+ if test "$nvmrc_node_version" = "N/A"
88+ nvm install (cat $nvmrc_path)
99+ else if test "$nvmrc_node_version" != "$node_version"
1010+ nvm use $nvmrc_node_version
1111+ end
1212+ else if test "$node_version" != "$default_node_version"
1313+ nvm use default
1414+ end
1515+end