-
Notifications
You must be signed in to change notification settings - Fork 725
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
Completer example #203
Comments
I'll put it on my to-do list. Thank for the request! |
Thank you so much. I think I figured it out, I updated my gist (https://gist.github.com/blark/46d6befc51909c7db4e0) it now does context-dependent completions, but I'm probably doing it poorly. I would love to hear your feedback... Or if I'm not doing it poorly I can add it as an example and send a pull request :) |
@jonathanslenders I too am interested in such a feature. I'd also expand on @blark's request to recommend based on sequence of all words leading to the current word. This would allow building a complete command hierarchy and context. For example, you could feed in a dictionary of
I'd like to know if you are currently considering/working/fancy a PR on something like this? |
Hi @pshirali, This functionality for the example you give is definitely useful. However, this is something that should be possible to build on top of prompt_toolkit, rather than inside of prompt_toolkit. It would be good for this to start as a separate project that implement the Actually, I also prefer to keep prompt_toolkit (the "core") to stay as small as possible, but have other people create tools around that. Jonathan |
@blark: I noticed that it is a year ago that I replied, sorry about that. Is the question still relevant? |
I learn best by example, I always like to see examples of best practice to understand how to start building something correctly. I have managed to figure out a solution, but would still love to see a very simple example of multi-level completions in the repo. But maybe that's just me... |
I implemented a NestedCompleter.It's here:https://gitee.com/BlueRhino/codes/q9yvef1whnmagdk3z0us259 |
It would be really nice to have a basic and well documented completer example. I hacked something together from the other apps around based on prompt toolkit, it's here: https://gist.github.com/blark/46d6befc51909c7db4e0 But this only completes a list of words.
What I'm really interested in is context dependent recommendations... changing the recommendation based on the last word typed. I could probably figure out a way to do it, but the code would be ugly -- I'd love to see a clean example. THANKS!
The text was updated successfully, but these errors were encountered: