@@ -248,6 +248,30 @@ for future authorization requests.
248248
249249
250250
251+ ### wp package is-installed
252+
253+ Checks if a given package is installed.
254+
255+ ~~~
256+ wp package is-installed <name>
257+ ~~~
258+
259+ Returns exit code 0 when installed, 1 when uninstalled.
260+
261+ ** OPTIONS**
262+
263+ <name>
264+ The package to check.
265+
266+ ** EXAMPLES**
267+
268+ # Check whether "foo/bar" is installed; exit status 0 if installed, otherwise 1
269+ $ wp package is-installed foo/bar
270+ $ echo $?
271+ 1
272+
273+
274+
251275### wp package list
252276
253277Lists installed WP-CLI packages.
@@ -310,6 +334,37 @@ These fields are optionally available:
310334
311335
312336
337+ ### wp package path
338+
339+ Gets the path to an installed WP-CLI package, or the package directory.
340+
341+ ~~~
342+ wp package path [<name>]
343+ ~~~
344+
345+ If you want to contribute to a package, this is a great way to jump to it.
346+
347+ ** OPTIONS**
348+
349+ [<name>]
350+ Name of the package to get the directory for.
351+
352+ ** EXAMPLES**
353+
354+ # Get package path.
355+ $ wp package path
356+ /home/person/.wp-cli/packages/
357+
358+ # Get path to an installed package.
359+ $ wp package path wp-cli/server-command
360+ /home/person/.wp-cli/packages/vendor/wp-cli/server-command
361+
362+ # Change directory to package path.
363+ $ cd $(wp package path) && pwd
364+ /home/vagrant/.wp-cli/packages
365+
366+
367+
313368### wp package update
314369
315370Updates installed WP-CLI packages to their latest version.
@@ -376,61 +431,6 @@ wp package uninstall <name> [--insecure]
376431 Removing package directories and regenerating autoloader...
377432 Success: Uninstalled package.
378433
379-
380-
381- ### wp package is-installed
382-
383- Checks if a given package is installed.
384-
385- ~~~
386- wp package is-installed <name>
387- ~~~
388-
389- Returns exit code 0 when installed, 1 when uninstalled.
390-
391- ** OPTIONS**
392-
393- <name>
394- The package to check.
395-
396- ** EXAMPLES**
397-
398- # Check whether "foo/bar" is installed; exit status 0 if installed, otherwise 1
399- $ wp package is-installed foo/bar
400- $ echo $?
401- 1
402-
403-
404-
405- ### wp package path
406-
407- Gets the path to an installed WP-CLI package, or the package directory.
408-
409- ~~~
410- wp package path [<name>]
411- ~~~
412-
413- If you want to contribute to a package, this is a great way to jump to it.
414-
415- ** OPTIONS**
416-
417- [<name>]
418- Name of the package to get the directory for.
419-
420- ** EXAMPLES**
421-
422- # Get package path.
423- $ wp package path
424- /home/person/.wp-cli/packages/
425-
426- # Get path to an installed package.
427- $ wp package path wp-cli/server-command
428- /home/person/.wp-cli/packages/vendor/wp-cli/server-command
429-
430- # Change directory to package path.
431- $ cd $(wp package path) && pwd
432- /home/vagrant/.wp-cli/packages
433-
434434## Installing
435435
436436This package is included with WP-CLI itself, no additional installation necessary.
0 commit comments