You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the wp db search command to search only in a given table (eg. wp_posts), I'd like the output to only contain IDs so I can export them elsewhere without having to extract them from the results which include the matching strings and the context.
Approximately the closest I can get to this is:
wp db search foo wp_posts --before_context=0 --after_context=0 --one_line
I'd like a flag for the opposite of --matches_only, probably --ids-only.
The text was updated successfully, but these errors were encountered:
We discussed this today during Hack Day. One suggestion to further enhance this is to leverage the formatter (--format) in a backward compatible manner. e.g. --format=ids or --format=matches (the default). The existing --matches_only arg could still be used, hence the backward compatibility. --format=ids with multiple tables doesn't really make sense, so this could be prevented with a warning/error.
When using the
wp db search
command to search only in a given table (eg.wp_posts
), I'd like the output to only contain IDs so I can export them elsewhere without having to extract them from the results which include the matching strings and the context.Approximately the closest I can get to this is:
I'd like a flag for the opposite of
--matches_only
, probably--ids-only
.The text was updated successfully, but these errors were encountered: