summaryrefslogtreecommitdiff
path: root/plugins/npx/README.md
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-10-21 16:57:03 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-10-21 16:57:03 -0600
commit058885f5263f29f046c96ea2ecf55e6dca3ed321 (patch)
tree5aca868fa5f9d16f39baa0c355f6056b5c8ea4da /plugins/npx/README.md
parent1774c426de3c4845e2d606c813c37067b8cf78d7 (diff)
parent3b1699b59527ee8095397b9909a37d55689a0481 (diff)
downloadzsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.tar.gz
zsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.tar.bz2
zsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/npx/README.md')
-rw-r--r--plugins/npx/README.md28
1 files changed, 18 insertions, 10 deletions
diff --git a/plugins/npx/README.md b/plugins/npx/README.md
index 1c052930b..41e4c1352 100644
--- a/plugins/npx/README.md
+++ b/plugins/npx/README.md
@@ -1,21 +1,15 @@
# NPX Plugin
-> npx(1) -- execute npm package binaries. ([more info](https://github.com/zkat/npx))
-This plugin automatically registers npx command-not-found handler if `npx` exists in your `$PATH`.
+> npx(1) -- execute npm package binaries. ([more info](https://github.com/npm/npx))
-## Setup
+This plugin automatically registers npx command-not-found handler if `npx` exists in your `$PATH`.
-- Add plugin to `~/.zshrc`
+To use it, add `npx` to the plugins array in your zshrc file:
-```bash
+```zsh
plugins=(.... npx)
```
-- Globally install npx binary (npx will be auto installed with recent versions of Node.js)
-```bash
-sudo npm install -g npx
-```
-
## Note
The shell auto-fallback doesn't auto-install plain packages. In order to get it to install something, you need to add `@`:
@@ -29,3 +23,17 @@ Started
It does it this way so folks using the fallback don't accidentally try to install regular typoes.
+## Deprecation
+
+Since npm v7, `npx` has been moved to `npm exec`. With the move, [the `--shell-auto-fallback` argument
+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):
+
+> Shell fallback functionality is removed, as it is not advisable.
+
+When using npm v7, you'll get this error:
+
+> npx: the --shell-auto-fallback argument has been removed
+
+If you get this error, just disable the plugin by removing it from the plugins array in your zshrc file.
+This plugin will no longer be maintained and will be removed in the future, when the older `npx` versions
+are no longer available.