Open dev-ardi opened 10 months ago
Conveniently enough I was just giving this some thought yesterday. Related:
My current idea for UI is similar to what git checkout -p
does where it displays a diff showing the change on a single chunk (for us we would probably show a prompt on every single replacement), and then you have an input where the user can select applying that change to all found values, applying that change to a single value, skipping a single value, and quitting
Is that similar to what you had in mind?
Honestly I was thinking about what sed does already: sed "s/foo/bar/g"
launches you into some sort of repl mode. You input a line and you get the result, and since we have the colored output already the user experience should be nice enough. We would need the line by line mode (I opened a PR for it already)
Ah yes, that's just sed
reading from stdin. We should be able to support the same once your line by line mode PR is merged
This is very easy to implement and allows for easier debugging.
I can implement this as soon as 1.0 has been branched.