OSDN Git Service

search-replace: the --dry-run flag should be last
authorscribu <mail@scribu.net>
Wed, 22 May 2013 12:59:50 +0000 (15:59 +0300)
committerscribu <mail@scribu.net>
Wed, 22 May 2013 12:59:50 +0000 (15:59 +0300)
man-src/search-replace.txt
man/search-replace.1
php/commands/search-replace.php

index 0168065..f6ead0c 100644 (file)
@@ -6,16 +6,16 @@ It will correctly handle serialized values, and will not change primary key valu
 
 ## OPTIONS
 
-* `--dry-run`:
+* `--skip-columns=<columns>`:
 
-       Show report, but don't perform the changes.
+       Do not perform the replacement in the comma-separated columns.
 
-* `--skip-columns=<columns>`:
+* `--dry-run`:
 
-       Do not perform the replacement in the comma-separated columns. Useful to preserve existing guid column values when changing domain names.
+       Show report, but don't perform the changes.
 
 ## EXAMPLES
 
-       wp search-replace 'http://example.dev' 'http://example.com' --dry-run --skip-columns=guid
+       wp search-replace 'http://example.dev' 'http://example.com' --skip-columns=guid
 
-       wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms
+       wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms --dry-run
index c532ce2..7ee007f 100644 (file)
@@ -7,7 +7,7 @@
 \fBwp\-search\-replace\fR \- Search/replace strings in the database\.
 .
 .SH "SYNOPSIS"
-wp search\-replace \fIold\fR \fInew\fR [\fItable\fR\.\.\.] [\-\-dry\-run] [\-\-skip\-columns=\fIcolumns\fR]
+wp search\-replace \fIold\fR \fInew\fR [\fItable\fR\.\.\.] [\-\-skip\-columns=\fIcolumns\fR] [\-\-dry\-run]
 .
 .SH "DESCRIPTION"
 This command will go through all rows in all tables and will replace all appearances of the old string with the new one\.
@@ -18,24 +18,24 @@ It will correctly handle serialized values, and will not change primary key valu
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-dry\-run\fR:
+\fB\-\-skip\-columns=<columns>\fR:
 .
 .IP
-Show report, but don\'t perform the changes\.
+Do not perform the replacement in the comma\-separated columns\.
 .
 .TP
-\fB\-\-skip\-columns=<columns>\fR:
+\fB\-\-dry\-run\fR:
 .
 .IP
-Do not perform the replacement in the comma\-separated columns\. Useful to preserve existing guid column values when changing domain names\.
+Show report, but don\'t perform the changes\.
 .
 .SH "EXAMPLES"
 .
 .nf
 
-wp search\-replace \'http://example\.dev\' \'http://example\.com\' \-\-dry\-run \-\-skip\-columns=guid
+wp search\-replace \'http://example\.dev\' \'http://example\.com\' \-\-skip\-columns=guid
 
-wp search\-replace \'foo\' \'bar\' wp_posts wp_postmeta wp_terms
+wp search\-replace \'foo\' \'bar\' wp_posts wp_postmeta wp_terms \-\-dry\-run
 .
 .fi
 
index c5ffbe9..a08af87 100644 (file)
@@ -10,7 +10,7 @@ class Search_Replace_Command extends WP_CLI_Command {
        /**
         * Search/replace strings in the database.
         *
-        * @synopsis <old> <new> [<table>...] [--dry-run] [--skip-columns=<columns>]
+        * @synopsis <old> <new> [<table>...] [--skip-columns=<columns>] [--dry-run]
         */
        public function __invoke( $args, $assoc_args ) {
                global $wpdb;