-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add ability to complete words #2
Comments
More detailed api would include: reader.completion_append_character # Character appended to completed words
reader.completion_items # maximum number of matched items, by default 100
reader.match_hidden_files # by default matching current directory files, by default true
reader.complete_with_tilde_expansion # expand tilde, by default false
reader.word_break_characters # The basic list of characters that signal a break between words
reader.completion_duplicates # disallow duplicates in matches, by default true |
@piotrmurach - I spent some time playing with this last night, and began to think that it's hard to design an API that makes sense to add to the So, for now what I'm doing is creating my own high-level library for "fancy prompting" that uses the low-level APIs of I'll definitely keep you in the loop about what I'm doing, and when I've got everything tidied up to something I'm relatively happy with, we can maybe brainstorm together and see if there's any abstractions you want to import into one or more of your libraries. I haven't checked the code into GitHub yet, but just for fun, here's a little teaser of what I came up with so far: |
This looks great! I excited about the behaviour as well. As far as complexity goes I think it's still can be split between When it comes to Anyhow, I'm looking forward to your implementation. |
Whatever happened to this? [removed the remaining content as not related to the issue or helpful] |
Is there a chance this issue will eventually be solved? |
@zzyzwicz As I recall I had a somewhat ready implementation for basic completions implemented. Will need to review it and remind myself where I left it off. I also wish this to be implemented as this is an important feature. I will try to look at this tomorrow as I already have plenty to do today. I know it's been a long wait but we will get there! |
Happy to see this progressing. |
@zzyzwicz Thanks for the feedback! 💯 agreed. |
I see you've implemented completion but version 0.10 is still sitting unreleased? Is there something wrong with it? |
Bump. This also interests me. I have an app that used readline, but it depends on the external library that is not always compiled into Ruby, which will now replace it with reline. However, I have found reline to have some incompatibilities with readline and to be poorly documented. TTY::Reader, on the other hand seems to have solid documentation and lots of potential for combining other components of the tty-toolkit into the presentation. I'd love to play with it as a replacement for readline/reline. Are you still working on this? Cheers. |
@jemc My initial stub at high level api would be something along these lines:
The text was updated successfully, but these errors were encountered: