bobthecow / psysh

A REPL for PHP
https://psysh.org
MIT License
9.74k stars 310 forks source link

what would it take to utilize prompt-toolkit (or replicate its features)? #668

Open ahillio opened 3 years ago

ahillio commented 3 years ago

Prompt Toolkit is an awesome library that enables really awesome things like a MySQL client with autocompletion, vi-mode, and more and a Python REPL with all those ++ awesome features.

I really want suggested autocompletion, vi-mode, history substring search (among other awesome features) in my php repl.

I have no idea what would be involved in utilizing Prompt Toolkit in PSYSH.

But I think it would be awesome.

ahillio commented 3 years ago

https://github.com/bobthecow/psysh/issues/392 might benefit from this.

ahillio commented 3 years ago

I'd gladly accept an answer (or guesstimate) in the form of a price tag :)

bobthecow commented 3 years ago

Yeah, that looks great :)

I'm not sure what it'd take, but it seems possible to do. To be perfectly honest, I don't have the bandwidth to take it on right now, but if you're interested in taking a shot at it, I'm happy to help with a game plan, review code, answer questions and give suggestions!

ahillio commented 3 years ago

Sweet, I'm glad you like the idea, and it'd be super helpful to have some guidance in the process!

As far as the overall biggest-picture approach... would you consider completely replacing GNU Readline with python-prompt-toolkit?

bobthecow commented 3 years ago

Not as a hard dependency, no. But we currently support three different readline implementations for various reasons and adding a fourth for improved UX seems doable.

There's also a Jupyter notebook integration that might be useful or informative.