Git Product home page Git Product logo

Comments (8)

danielbachhuber avatar danielbachhuber commented on August 20, 2024 1

Huh. That's not awful then, I suppose.

from search-replace-command.

gitlost avatar gitlost commented on August 20, 2024

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.

danielbachhuber avatar danielbachhuber commented on August 20, 2024

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.

gitlost avatar gitlost commented on August 20, 2024

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.

danielbachhuber avatar danielbachhuber commented on August 20, 2024

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.

gitlost avatar gitlost commented on August 20, 2024

I mean for it to behave like [--export=[<file>]], so a simple --log would go to STDOUT.

from search-replace-command.

danielbachhuber avatar danielbachhuber commented on August 20, 2024

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.

gitlost avatar gitlost commented on August 20, 2024

Here's a prototype output:

prototype_log

from search-replace-command.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.