Comments (8)
Huh. That's not awful then, I suppose.
from search-replace-command.
I'd like to give this a bash. I'm thinking of doing it by adding a new option [--log[=<file>]]
?
Also I think a new command search
should be added here for convenience which just defaults the <new>
arg to null and sets the --dry-run
option to true and the new log option to true (unless already set). This in addition to merging the db ack
command wp-cli/db-command#7 (which I'll also do) as although there's significant overlap it seems very natural to have a search
command (in effect an alias) that behaves like this (plus it's easy to do!).
from search-replace-command.
Also I think a new command
search
should be added here for convenience which just defaults the<new>
arg to null and sets the--dry-run
option to true and the new log option to true (unless already set).
My preference would be to focus on wp db ack
for now, until it can be established the search
command fills a distinct need. Difference use cases around the same feature are better solved with documentation.
from search-replace-command.
Okay, will leave it out. Do you think [--log[=<file>]]
is the right approach? Would also add supporting options like [[--log-context=<num_words>]]
or similar.
from search-replace-command.
Do you think
[--log[=<file>]]
is the right approach?
Not particularly. I'd display to STDOUT, which gives the user more control over where the data ends up.
from search-replace-command.
I mean for it to behave like [--export=[<file>]]
, so a simple --log
would go to STDOUT.
from search-replace-command.
Now that we have wp db search
, can we close this issue?
I'm not sure it's realistic to produce a visual report of the transformations taking place; this seems more effort than it's worth.
Instead, it'd be good to know what use case isn't already solved by wp db search
.
from search-replace-command.
Here's a prototype output:
from search-replace-command.
Related Issues (20)
- Progress bar
- Flag --no-recurse-objects is ignored HOT 2
- Search-replace does not replace keys in serialized values HOT 5
- operate on files too - important for plugins that cache or generate code HOT 1
- Limit search-replace in DB --wp_db_id="wp_posts:1234" (New command parameter) HOT 5
- How do I pull a report that shows every occurrence of specific word in my posts and pages? HOT 1
- Dangerous bug replaces term with table name HOT 2
- PHP 8: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string HOT 1
- Lock framework to stable version again before release HOT 1
- Had To Update Post To Make Search & Replace Serialized Data To Display
- Regex search-replace has to be run multiple times to replace all instances HOT 7
- Replacing all occurrences requires multiple runs HOT 11
- search-replace does not update wp_blogs and wp_site tables HOT 5
- PHP 8.1 - PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated HOT 1
- 6.1 Beta 1 Compatibility with search-replace HOT 4
- search-replace can be/is broken because of incorrect implode()
- Introduce a dedicated `search-replace url` command HOT 2
- SQLite Compatibility
- WP CLI running PHP 8.1 can't unserialize empty PHP 8.0 objects HOT 5
- Smarter replacement checks for columns HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from search-replace-command.