Open jonathanslenders opened 7 years ago
Will these calls to prompt return the entered string as usual?
Yes. That's the idea. But further, an API similar to what we have right now, that doesn't create such a session should remain. In that case, I'll use a global "session" object. This is what readline does as well, and it's similar to how the "requests" library create HTTP sessions.
Deprecate
prompt_toolkit.shortcuts
and create an improved API instead. (However, don't remove the shortcuts module, there are too many people using it.)The reason is that right now, we are missing some "state" between multiple calls of "prompt()". for instance, we loose the search history between two calls. But also, "operate-and-get-next" can't work without keeping some state in between "prompt()" calls.
I propose to build a new API like this: