my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

3 years ago
  1. # NPX Plugin
  2. > npx(1) -- execute npm package binaries. ([more info](https://github.com/npm/npx))
  3. This plugin automatically registers npx command-not-found handler if `npx` exists in your `$PATH`.
  4. To use it, add `npx` to the plugins array in your zshrc file:
  5. ```zsh
  6. plugins=(.... npx)
  7. ```
  8. ## Note
  9. The shell auto-fallback doesn't auto-install plain packages. In order to get it to install something, you need to add `@`:
  10. ```
  11. ➜ jasmine@latest # or just `jasmine@`
  12. npx: installed 13 in 1.896s
  13. Randomized with seed 54385
  14. Started
  15. ```
  16. It does it this way so folks using the fallback don't accidentally try to install regular typoes.
  17. ## Deprecation
  18. Since npm v7, `npx` has been moved to `npm exec`. With the move, [the `--shell-auto-fallback` argument
  19. for `npx` has been removed](https://github.com/npm/cli/blob/v7.0.0/docs/content/cli-commands/npm-exec.md#compatibility-with-older-npx-versions):
  20. > Shell fallback functionality is removed, as it is not advisable.
  21. When using npm v7, you'll get this error:
  22. > npx: the --shell-auto-fallback argument has been removed
  23. If you get this error, just disable the plugin by removing it from the plugins array in your zshrc file.
  24. This plugin will no longer be maintained and will be removed in the future, when the older `npx` versions
  25. are no longer available.