OSDN Git Service

Update man docs to mention `--fields`
authorDaniel Bachhuber <d@danielbachhuber.com>
Wed, 8 May 2013 23:42:37 +0000 (16:42 -0700)
committerDaniel Bachhuber <d@danielbachhuber.com>
Wed, 8 May 2013 23:42:37 +0000 (16:42 -0700)
man-src/post-list.txt
man-src/role-list.txt
man-src/term-list.txt
man-src/user-list.txt
man/post-list.1
man/role-list.1
man/term-list.1
man/user-list.1

index 47849ce..6763748 100644 (file)
@@ -4,6 +4,10 @@
 
        One or more args to pass to WP_Query.
 
+* `--fields`=<fields>:
+
+       Limit the output to specific object fields. Defaults to ID,post_title,post_name,post_date.
+
 * `--format`=<format>:
 
        Output list as table, CSV, JSON, or simply IDs. Defaults to table.
@@ -13,3 +17,5 @@
        wp post list --format=ids
 
        wp post list --post_type=post --posts_per_page=5 --format=json
+
+       wp post list --post_type=page --fields=post_title,post_status
index a2dcd0c..2b79401 100644 (file)
@@ -1,9 +1,13 @@
 ## OPTIONS
 
+* `--fields`=<fields>:
+
+       Limit the output to specific object fields. Defaults to name,role.
+
 * `--format`=<format>:
 
        Output list as table, CSV or JSON. Defaults to table.
 
 ## EXAMPLES
 
-    wp role list
+    wp role list --fields=role --format=csv
index f782b7e..18cd0a4 100644 (file)
@@ -4,10 +4,16 @@
 
        List terms of a given taxonomy.
 
+* `--fields`=<fields>:
+
+       Limit the output to specific object fields. Defaults to all of the term object fields.
+
 * `--format`=<format>:
 
        Output list as table, CSV, JSON, or simply IDs. Defaults to table.
 
 ## EXAMPLES
 
-       wp term list category --format=csv
\ No newline at end of file
+       wp term list category --format=csv
+
+       wp term list post_tag --fields=name,slug
index d30757b..0aa7951 100644 (file)
@@ -4,6 +4,10 @@
 
        Only display users with a certain role.
 
+* `--fields`=<fields>:
+
+       Limit the output to specific object fields. Defaults to ID,user_login,display_name,user_email,user_registered,roles
+
 * `--format`=<format>:
 
        Output list as table, CSV, JSON, or simply IDs. Defaults to table.
@@ -13,3 +17,5 @@
        wp user list --format=ids
 
        wp user list --role=administrator --format=csv
+
+       wp user list --fields=display_name,user_email
index b208750..83d3c39 100644 (file)
@@ -7,7 +7,7 @@
 \fBwp\-post\-list\fR \- Get a list of posts\.
 .
 .SH "SYNOPSIS"
-wp post list [\-\-\fIfield\fR=\fIvalue\fR] [\-\-format=\fIformat\fR]
+wp post list [\-\-\fIfield\fR=\fIvalue\fR] [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
 .
 .SH "OPTIONS"
 .
@@ -18,6 +18,12 @@ wp post list [\-\-\fIfield\fR=\fIvalue\fR] [\-\-format=\fIformat\fR]
 One or more args to pass to WP_Query\.
 .
 .TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to ID,post_title,post_name,post_date\.
+.
+.TP
 \fB\-\-format\fR=\fIformat\fR:
 .
 .IP
@@ -30,6 +36,8 @@ Output list as table, CSV, JSON, or simply IDs\. Defaults to table\.
 wp post list \-\-format=ids
 
 wp post list \-\-post_type=post \-\-posts_per_page=5 \-\-format=json
+
+wp post list \-\-post_type=page \-\-fields=post_title,post_status
 .
 .fi
 
index a962cca..14d58a8 100644 (file)
@@ -7,11 +7,17 @@
 \fBwp\-role\-list\fR \- List all roles\.
 .
 .SH "SYNOPSIS"
-wp role list [\-\-format=\fIformat\fR]
+wp role list [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
 .
 .SH "OPTIONS"
 .
 .TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to name,role\.
+.
+.TP
 \fB\-\-format\fR=\fIformat\fR:
 .
 .IP
@@ -21,7 +27,7 @@ Output list as table, CSV or JSON\. Defaults to table\.
 .
 .nf
 
-wp role list
+wp role list \-\-fields=role \-\-format=csv
 .
 .fi
 
index 9990d2f..ef15301 100644 (file)
@@ -7,7 +7,7 @@
 \fBwp\-term\-list\fR \- List terms in a taxonomy\.
 .
 .SH "SYNOPSIS"
-wp term list \fItaxonomy\fR [\-\-format=\fIformat\fR]
+wp term list \fItaxonomy\fR [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
 .
 .SH "OPTIONS"
 .
@@ -18,6 +18,12 @@ wp term list \fItaxonomy\fR [\-\-format=\fIformat\fR]
 List terms of a given taxonomy\.
 .
 .TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to all of the term object fields\.
+.
+.TP
 \fB\-\-format\fR=\fIformat\fR:
 .
 .IP
@@ -28,6 +34,8 @@ Output list as table, CSV, JSON, or simply IDs\. Defaults to table\.
 .nf
 
 wp term list category \-\-format=csv
+
+wp term list post_tag \-\-fields=name,slug
 .
 .fi
 
index 8d66afa..f5dac94 100644 (file)
@@ -7,7 +7,7 @@
 \fBwp\-user\-list\fR \- List users\.
 .
 .SH "SYNOPSIS"
-wp user list [\-\-role=\fIrole\fR] [\-\-format=\fIformat\fR]
+wp user list [\-\-role=\fIrole\fR] [\-\-fields=\fIfields\fR] [\-\-format=\fIformat\fR]
 .
 .SH "OPTIONS"
 .
@@ -18,6 +18,12 @@ wp user list [\-\-role=\fIrole\fR] [\-\-format=\fIformat\fR]
 Only display users with a certain role\.
 .
 .TP
+\fB\-\-fields\fR=\fIfields\fR:
+.
+.IP
+Limit the output to specific object fields\. Defaults to ID,user_login,display_name,user_email,user_registered,roles
+.
+.TP
 \fB\-\-format\fR=\fIformat\fR:
 .
 .IP
@@ -30,6 +36,8 @@ Output list as table, CSV, JSON, or simply IDs\. Defaults to table\.
 wp user list \-\-format=ids
 
 wp user list \-\-role=administrator \-\-format=csv
+
+wp user list \-\-fields=display_name,user_email
 .
 .fi