Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: REPL mode #261

Open
dev-ardi opened this issue Oct 31, 2023 · 3 comments
Open

Feature request: REPL mode #261

dev-ardi opened this issue Oct 31, 2023 · 3 comments

Comments

@dev-ardi
Copy link
Contributor

dev-ardi commented Oct 31, 2023

This is very easy to implement and allows for easier debugging.

I can implement this as soon as 1.0 has been branched.

@dev-ardi dev-ardi changed the title REPL mode Feature request: REPL mode Oct 31, 2023
@CosmicHorrorDev
Copy link
Collaborator

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?

@dev-ardi
Copy link
Contributor Author

dev-ardi commented Nov 1, 2023

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)

@CosmicHorrorDev
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants