-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[readme] optimize calling of nvm version
in zsh
#2874
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Landing this will have to wait until I've resolved CI issues unrelated to this PR, but please keep the PR/branch/fork around so I can do that :-)
Looks like I pushed a new commit seconds before you approved. Do you want me to clean up the commits on this PR or will you squash merge? |
i'll rebase it when it's time, no worries :-) |
2230416
to
4893128
Compare
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
Now we only call `nvm version` in case we changed directory and we are not anymore in a `.nvmrc` directory. See nvm-sh/nvm#2874
The zsh hook in the readme causes
cd
to take unnecessarily long when working in directory tress without.nvmrc
files due to always callingnvm version
andnvm version default
.We should only call
nvm version
andnvm version default
if we left a directory with a.nvmrc
file.nvm_find_nvmrc
andnvm_find_up
are fast, so by creating a similar search, but withOLDPWD
, unneeded calls tonvm version
andnvm version default
are eliminated.