Open rosswintle opened 3 months ago
I am seeing --format
argument in db search:
wp db search <search> [<tables>...] [--network] [--all-tables-with-prefix] [--all-tables] [--before_context=<num>] [--after_context=<num>] [--regex]
[--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>] [--table_column_once] [--one_line] [--matches_only] [--stats]
[--table_column_color=<color_code>] [--id_color=<color_code>] [--match_color=<color_code>] [--fields=<fields>] [--format=<format>]
Using: WP-CLI 2.11
@rosswintle Check with wp package list
to see if you might have a custom version of the wp-cli/db-command
package installed.
No, I get:
+----------------------------------+------------------+------------+-----------+----------------+
| name | authors | version | update | update_version |
+----------------------------------+------------------+------------+-----------+----------------+
| aaemnnosttv/wp-cli-valet-command | Evan Mattson | dev-master | available | dev-master |
| wp-cli/admin-command | | dev-master | none | |
| wp-cli/dist-archive-command | Daniel Bachhuber | dev-master | none | |
+----------------------------------+------------------+------------+-----------+----------------+
Some more information:
My regular wp-cli is in ~/wp-cli
. I've looked in ~/wp-cli/vendor/wp-cli/db-command/src/DB_Command.php
and this is not the up-to-date DB command. It does NOT have the --format
option.
I also have a ~/.wp-cli
and I've looked in ~/.wp-cli/packages/vendor/wp-cli/db-command/src/DB_Command.php
and that is also not up to date.
Where should I expect to see up-to-date command package files?
Bug Report
Describe the current, buggy behavior
After an update to wp-cli version 2.11.0 I do not seem to have the
--format
flag on thewp db search
command.I noticed that version 2.11.0 of WP-CLI included an update to the
db search
command to add a--format
option.I wanted to try this out, so I did
wp cli update
on my local machine, but I don't seem to have this new option.I can replicate this by installing the latest wp-cli fresh and running
wp help db search
Describe how other contributors can replicate this bug
mkdir wp-cli-test
and enter itcurl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php ./wp-cli/phar help db search
--format
parameterphp <directory>/wp-cli-test/wp-cli.phar db search --format
Describe what you expect as the correct outcome
The
db search
command should have a--format
option/parameterLet us know what environment you are running this on