Last active
October 8, 2019 11:33
-
-
Save mCzolko/5c073f8dea04a1f70e14272dcc4ed0f3 to your computer and use it in GitHub Desktop.
NVM automatic switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install NVM or FVM | |
# https://github.com/nvm-sh/nvm | |
# https://github.com/Schniz/fnm | |
cd () { builtin cd "$@" && chpwd; } | |
chpwd () { | |
NVM_PATH="$PWD/.nvmrc" | |
if test -f "$NVM_PATH"; then | |
nvm use | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment