Correct order and variables:
NVM_VERSION="v0.40.3"
NVM_URL="https://raw.githubusercontent.com /nvm-sh/nvm/${NVM_VERSION}/install.sh" TMP_INSTALL="/tmp/nvm-install.sh"
NVM_DIR="$HOME/.nvm"
The fully expanded URL is: https://raw.githubusercontent.com/nvm-sh /nvm/v0.40.3/install.sh
Safe download + review commands: curl -fsSL "$NVM_URL" -o "$TMP_INSTALL" head -n 200 "$TMP_INSTALL" # review the installer