Simply add to your ~/.bashrc:
~/.bashrc
enter_directory() { if [[ $PWD == $PREV_PWD ]]; then return; fi PREV_PWD=$PWD nodefile=.node-version [[ -f "$nodefile" ]] && nvm use $(cat $nodefile) } export PROMPT_COMMAND=enter_directory
Empty! You must sign in to add comments.
None
Comments
Empty! You must sign in to add comments.