Add transparent lazy-loading of nvm

This commit is contained in:
Jake Howard 2018-10-14 20:11:32 +01:00
parent 7cc1976e8a
commit 5bd61720ca
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 3 additions and 3 deletions

View file

@ -36,5 +36,4 @@ alias src="source $HOME/.zshrc"
{% if ansible_fqdn == "TOO-Work" %}
pyenv-init
nvm-init
{% endif %}

View file

@ -34,9 +34,10 @@ nr() {
alias nrc="npm run coverage"
alias nrm="npm run mocha"
alias nvmu="nvm use"
nvm-init() {
nvm() { # This takes ~1sec, so we lazy-load it.
unset $0
source "/usr/share/nvm/init-nvm.sh"
$0 $@
}