Skip to content

Commit 79423e4

Browse files
Update docs to mention depth and alias
1 parent 3155419 commit 79423e4

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contr
1010
## Using
1111

1212
~~~
13-
wp find <path> [--skip-ignored-paths] [--fields=<fields>] [--field=<field>] [--format=<format>] [--verbose]
13+
wp find <path> [--skip-ignored-paths] [--max_depth=<max-depth>] [--fields=<fields>] [--field=<field>] [--format=<format>] [--verbose]
1414
~~~
1515

1616
Recursively iterates subdirectories of provided `<path>` to find and
@@ -20,13 +20,16 @@ with a version.php file.
2020
Avoids recursing some known paths (e.g. node_modules) to significantly
2121
improve performance.
2222

23+
Indicates depth at which the WordPress install was found, and its alias,
24+
if it has one.
25+
2326
```
2427
$ wp find ./
25-
+---------------------------------------------------------------------+---------------------+
26-
| version_path | version |
27-
+---------------------------------------------------------------------+---------------------+
28-
| /Users/wpcli/projects/wordpress-develop/src/wp-includes/version.php | 4.8-alpha-39357-src |
29-
+---------------------------------------------------------------------+---------------------+
28+
+--------------------------------------+---------------------+-------+--------+
29+
| version_path | version | depth | alias |
30+
+--------------------------------------+---------------------+-------+--------+
31+
| /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
32+
+--------------------------------------+---------------------+-------+--------+
3033
```
3134

3235
**OPTIONS**
@@ -37,6 +40,9 @@ $ wp find ./
3740
[--skip-ignored-paths]
3841
Skip the paths that are ignored by default.
3942

43+
[--max_depth=<max-depth>]
44+
Only recurse to a specified depth, inclusive.
45+
4046
[--fields=<fields>]
4147
Limit the output to specific row fields.
4248

src/Find_Command.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,16 @@ class Find_Command {
102102
* Avoids recursing some known paths (e.g. node_modules) to significantly
103103
* improve performance.
104104
*
105+
* Indicates depth at which the WordPress install was found, and its alias,
106+
* if it has one.
107+
*
105108
* ```
106109
* $ wp find ./
107-
* +---------------------------------------------------------------------+---------------------+
108-
* | version_path | version |
109-
* +---------------------------------------------------------------------+---------------------+
110-
* | /Users/wpcli/projects/wordpress-develop/src/wp-includes/version.php | 4.8-alpha-39357-src |
111-
* +---------------------------------------------------------------------+---------------------+
110+
* +--------------------------------------+---------------------+-------+--------+
111+
* | version_path | version | depth | alias |
112+
* +--------------------------------------+---------------------+-------+--------+
113+
* | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
114+
* +--------------------------------------+---------------------+-------+--------+
112115
* ```
113116
*
114117
* ## OPTIONS

0 commit comments

Comments
 (0)