OSDN Git Service

update shell man page
authorscribu <mail@scribu.net>
Tue, 30 Apr 2013 16:53:22 +0000 (19:53 +0300)
committerscribu <mail@scribu.net>
Tue, 30 Apr 2013 16:53:23 +0000 (19:53 +0300)
[ci skip]

man-src/shell.txt
man/shell.1

index ccd56f4..1759cff 100644 (file)
@@ -2,4 +2,8 @@
 
 `wp shell` allows you to evaluate PHP statements and expressions interactively, from within a WordPress environment. This means that you have access to all the functions, classes and globals that you would have access to from inside a WordPress plugin, for example.
 
+`$_` is a special variable that contains the result from the last evaluated statement.
+
+You can split a statement over multiple lines by adding a `\` (backslash) before hitting Return.
+
 If you type `history` and hit Return, WP-CLI will print the list of previously evaluated statements, which you can copy+paste into a PHP file.
index de0e717..d145d4a 100644 (file)
@@ -13,4 +13,10 @@ wp shell
 \fBwp shell\fR allows you to evaluate PHP statements and expressions interactively, from within a WordPress environment\. This means that you have access to all the functions, classes and globals that you would have access to from inside a WordPress plugin, for example\.
 .
 .P
+\fB$_\fR is a special variable that contains the result from the last evaluated statement\.
+.
+.P
+You can split a statement over multiple lines by adding a \fB\e\fR (backslash) before hitting Return\.
+.
+.P
 If you type \fBhistory\fR and hit Return, WP\-CLI will print the list of previously evaluated statements, which you can copy+paste into a PHP file\.