浏览代码

feat(nvm): add `pnpx` as lazy cmd

Carlo Sala 7 月之前
父节点
当前提交
a3dfe29036
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 4 3
      plugins/nvm/README.md
  2. 1 1
      plugins/nvm/nvm.plugin.zsh

+ 4 - 3
plugins/nvm/README.md

@@ -26,9 +26,10 @@ 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`, `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:
+nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `pnpx`, `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

+ 1 - 1
plugins/nvm/nvm.plugin.zsh

@@ -74,7 +74,7 @@ function _omz_setup_autoload {
 if zstyle -t ':omz:plugins:nvm' lazy; then
   # 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 corepack $nvm_lazy_cmd) # default values
+  nvm_lazy_cmd=(nvm node npm npx pnpm pnpx yarn corepack $nvm_lazy_cmd) # default values
   eval "
     function $nvm_lazy_cmd {
       for func in $nvm_lazy_cmd; do