summaryrefslogtreecommitdiff
path: root/plugins/nvm
diff options
context:
space:
mode:
authorCarlo Sala <carlosalag@protonmail.com>2024-05-06 09:49:21 +0200
committerCarlo Sala <carlosalag@protonmail.com>2024-05-07 21:30:52 +0200
commit8c5f64cc2f0e75399a1e906e39713ed25b65ece1 (patch)
tree6edd126891be65e2c5206c6304b84260bd631c58 /plugins/nvm
parent22bbc233e90f18ad7a02625c66d1867a5486fcbb (diff)
downloadzsh-8c5f64cc2f0e75399a1e906e39713ed25b65ece1.tar.gz
zsh-8c5f64cc2f0e75399a1e906e39713ed25b65ece1.tar.bz2
zsh-8c5f64cc2f0e75399a1e906e39713ed25b65ece1.zip
feat(nvm): add `corepack` to `lazy_cmd`
Diffstat (limited to 'plugins/nvm')
-rw-r--r--plugins/nvm/README.md6
-rw-r--r--plugins/nvm/nvm.plugin.zsh4
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/nvm/README.md b/plugins/nvm/README.md
index e88ce0158..eb1e236ee 100644
--- a/plugins/nvm/README.md
+++ b/plugins/nvm/README.md
@@ -26,9 +26,9 @@ These settings should go in your zshrc file, before Oh My Zsh is sourced:
#### Lazy startup
This option will help you to defer nvm's load until you use it to speed-up your zsh startup. This will source
-nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `yarn`, and the
-command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be loaded and run with
-default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is sourced:
+nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `yarn`, `corepack`
+and the command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be loaded and run
+with default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is sourced:
```zsh
zstyle ':omz:plugins:nvm' lazy yes
diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh
index c2e8de94b..95c94030a 100644
--- a/plugins/nvm/nvm.plugin.zsh
+++ b/plugins/nvm/nvm.plugin.zsh
@@ -72,9 +72,9 @@ function _omz_setup_autoload {
}
if zstyle -t ':omz:plugins:nvm' lazy; then
- # Call nvm when first using nvm, node, npm, pnpm, yarn or other commands in lazy-cmd
+ # Call nvm when first using nvm, node, npm, pnpm, yarn, corepack or other commands in lazy-cmd
zstyle -a ':omz:plugins:nvm' lazy-cmd nvm_lazy_cmd
- nvm_lazy_cmd=(nvm node npm npx pnpm yarn $nvm_lazy_cmd) # default values
+ nvm_lazy_cmd=(nvm node npm npx pnpm yarn corepack $nvm_lazy_cmd) # default values
eval "
function $nvm_lazy_cmd {
for func in $nvm_lazy_cmd; do