80_nvm.zsh 502 B

12345678910111213141516171819202122232425
  1. #
  2. # NVM settings
  3. #
  4. NVM_DIR=
  5. if [ -f "${HOME}/.nvm/nvm.sh" ]; then
  6. NVM_DIR="${HOME}/.nvm"
  7. elif [ -f "/usr/local/nvm/nvm.sh" ]; then
  8. NVM_DIR="/usr/local/nvm"
  9. fi
  10. export NVM_DIR
  11. if [ -n "${NVM_DIR}" ]; then
  12. if [ "${UID}" = 0 ] && [ -n "${SUDO_UID}" ] ; then
  13. export ZSH_DISABLE_COMPFIX=true
  14. fi
  15. if [ -s "${NVM_DIR}/nvm.sh" ]; then
  16. source "${NVM_DIR}/nvm.sh"
  17. fi
  18. if [ -s "${NVM_DIR}/bash_completion" ]; then
  19. source "${NVM_DIR}/bash_completion"
  20. fi
  21. fi