diff --git a/README.md b/README.md index 86ca1f4..f85840b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## SYNOPSIS -`npx [--package|-p ] [--cache ] [--userconfig ] [-c ] [--shell|-s ] [--shell-auto-fallback [shell]] [--ignore-existing] [--version|-v] [--] [@version] [command-arg]...` +`npx [--package|-p ] [--cache ] [--userconfig ] [-c ] [--shell|-s ] [--shell-auto-fallback []] [--ignore-existing] [--version|-v] [--] [@version] [command-arg]...` ## INSTALL @@ -24,15 +24,13 @@ If a version specifier is included, or if `--package` is used, npx will ignore t * `--cache ` - set the location of the npm cache. Defaults to npm's own cache settings. -* `-g, --global` - install the package globally before execution. - * `--userconfig` - path to the user configuration file to pass to npm. Defaults to whatever npm's current default is. * `-c ` - Execute `` inside a shell. For unix, this will be `/bin/sh -c `. For Windows, it will be `cmd.exe /d /s /c `. Only the first item in `` will be automatically used as ``. Any others _must_ use `-p`. * `--shell ` - The shell to invoke the command with, if any. Defaults to `false`. -* `--shell-auto-fallback [shell]` - Generates shell code to override your shell's "command not found" handler with one that calls `npx`. Tries to figure out your shell, or you can pass its name (either `bash`, `fish`, or `zsh`) as an option. See below for how to install. +* `--shell-auto-fallback []` - Generates shell code to override your shell's "command not found" handler with one that calls `npx`. Tries to figure out your shell, or you can pass its name (either `bash`, `fish`, or `zsh`) as an option. See below for how to install. * `--ignore-existing` - If this flag is set, npx will not look in `$PATH`, or in the current package's `node_modules/.bin` for an existing version before deciding whether to install. Binaries in those paths will still be available for execution, but will be shadowed by any packages requested by this install. @@ -60,6 +58,17 @@ $ cat package.json ``` $ npx -p cowsay -c 'echo "foo" | cowsay' +... ++ cowsay@1.1.9 +added 1 package in 0.421s + _____ +< foo > + ----- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || ``` ## SHELL AUTO FALLBACK diff --git a/parse-args.js b/parse-args.js index 2893b57..64c8029 100644 --- a/parse-args.js +++ b/parse-args.js @@ -3,7 +3,7 @@ const npa = require('npm-package-arg') const yargs = require('yargs') -const usage = `$0 [--package|-p ] [--cache ] [--userconfig ] [-c ] [--shell ] [--shell-auto-fallback [shell]] [--ignore-existing] [--version|-v] [--] [@version] [command-arg]...` +const usage = `$0 [--package|-p ] [--cache ] [--userconfig ] [-c ] [--shell ] [--shell-auto-fallback []] [--ignore-existing] [--version|-v] [--] [@version] [command-arg]...` module.exports = parseArgs function parseArgs () {