Skip to content

Conversation

@mxriverlynn
Copy link

I added an example to automatically nvm use when changing directories in a Bash shell, similar to the one for Zsh. The function is the same as the Zsh example, but the method of implementing overrides the cd command in bash, and then calls the built-in cd before calling the load-nvmrc function.

I've been using this on OSX for a bit now, and it seems to be working well in my basic testing.

I added an example to automatically `nvm use` when changing directories in a Bash shell, similar to the one for Zsh. The function is the same as the Zsh example, but the method of implementing overrides the `cd` command in bash, and then calls the built-in `cd` before calling the `load-nvmrc` function. 

I've been using this on OSX for a bit now, and it seems to be working well in my basic testing.
@mxriverlynn
Copy link
Author

so it turns out this was a really bad idea.

it causes too many executions of that function, and is eating up my CPU when doing things like npm install or rm -rdf node_modules for any of my projects

ljharb added a commit that referenced this pull request Nov 6, 2018
[Docs] Add section on automatic `nvm use` in Bash

Replaces #1108 and #1677. Closes #1678.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant