Skip to content
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

Add NVM_LAZY_LOAD_EXTRA_COMMANDS option #67

Merged
merged 3 commits into from
Jun 16, 2020
Merged

Add NVM_LAZY_LOAD_EXTRA_COMMANDS option #67

merged 3 commits into from
Jun 16, 2020

Conversation

joerideg
Copy link
Contributor

Here we go, I gave it a shot. It includes tests and documentation in README.md
Please review.

@joerideg joerideg marked this pull request as ready for review May 27, 2020 14:16
@joerideg
Copy link
Contributor Author

Closes #66

Copy link
Owner

@lukechilds lukechilds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Are you able to take another look at the test? It should probably be failing since the arrays aren't currently being merged properly.

zsh-nvm.plugin.zsh Outdated Show resolved Hide resolved

# Set NVM_LAZY_LOAD to true
export NVM_LAZY_LOAD=true
export NVM_LAZY_LOAD_EXTRA_COMMANDS=('vim' 'ls')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim may not exist on all machines where we run tests and ls could be called inside other functions inside zsh-nvm.

For the test vectors can you choose commonly available yet not that widely used binaries, and things we are unlikely to ever call in zsh-nvm.

whoami and hostname spring to mind.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll use whoami

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change ls to hostname too. Otherwise if we use ls somewhere it could cause the test to start failing.

@joerideg
Copy link
Contributor Author

Are you able to take another look at the test? It should probably be failing since the arrays aren't currently being merged properly.
Actually the tests worked before, I tried before pushing the MR.

I've added the changes and amended the commit.

@joerideg joerideg requested a review from lukechilds June 4, 2020 09:37
@lukechilds
Copy link
Owner

@joerideg sorry, haven't had a chance to look at this, got some covid related craziness going on at my end. I haven't forgotten about it, I'll get round to it as soon as I'm able.

Copy link
Owner

@lukechilds lukechilds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, I just got round to reviewing and testing this.

It works great, thanks!

If you could just make the minor tweaks I suggested this is good to be merged.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
tests/options/NVM_LAZY_LOAD_EXTRA_COMMANDS Outdated Show resolved Hide resolved
Use `hostname` instead of `ls` in test of NVM_LAZY_LOAD_EXTRA_COMMANDS option
@joerideg
Copy link
Contributor Author

@lukechilds I've updated the MR as requested.

@joerideg joerideg requested a review from lukechilds June 16, 2020 06:37
@lukechilds lukechilds merged commit 23067bd into lukechilds:master Jun 16, 2020
@lukechilds
Copy link
Owner

Perfect, thanks @joerideg!

@joerideg joerideg deleted the NVM_LAZY_LOAD_EXTRA_COMMANDS branch June 17, 2020 14:44
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.

2 participants