feat(nvm)!: make lazy and autoload options compatible

BREAKING CHANGE: Prior to this commit, if `lazy` and `autoload` options
were enabled at the same time, `lazy` was getting overriden and only
`autoload` was taken into account.
Now they work together and `autoload` will be enabled after `nvm` has
been lazy-loaded.

Closes #11690
This commit is contained in:
Carlo Sala 2024-03-04 11:02:37 +01:00
commit 94aa49c0b9
No known key found for this signature in database
GPG key ID: DA6FB450C1A4FE9A
2 changed files with 54 additions and 44 deletions

View file

@ -43,8 +43,7 @@ zstyle ':omz:plugins:nvm' lazy-cmd eslint prettier typescript ...
#### `.nvmrc` autoload
Note: _this option cannot be used at the same time as `lazy`. `autoload` will override it and load `nvm` at
startup._
Note: _if used at the same time as `lazy`, `autoload` will start working only after nvm has been lazy-loaded_
If set, the plugin will automatically load a node version when if finds a
[`.nvmrc` file](https://github.com/nvm-sh/nvm#nvmrc) in the current working directory indicating which node