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

why is readline used? #1545

Closed
alok opened this issue Apr 17, 2021 · 5 comments
Closed

why is readline used? #1545

alok opened this issue Apr 17, 2021 · 5 comments
Assignees
Labels
nonfix closed without a successful fix (invalid, wontfix) userquestion not quite bugs--inquiries from users
Milestone

Comments

@alok
Copy link

alok commented Apr 17, 2021

using rustyline would allow for integrating fuzzy search as in kkawakam/rustyline#323

i think fuzzy search/completion should be a primitive in text UIs, so i'm evangelizing rn

@alok alok added the userquestion not quite bugs--inquiries from users label Apr 17, 2021
@dankamongmen
Copy link
Owner

I'm willing to take a look at it -- and thanks for the suggestion! -- but I'm initially disinclined, since rust stuff tends to be so poorly packaged in distributions. I'm also unsure how well C calling into Rust works, though I've heard it's pretty smooth. The calls into Readline are hardly performance-sensitive, so any overhead from cross-language calls ought not be a problem.

Before I can consider doing this, I'll need to verify that rustyline is available, in a form that can be linked from C programs, in at least the distributions in which notcurses is currently shipped. That would include Debian and derivatives thereof, Fedora and derivatives thereof, Alpine, Gentoo, Arch, and FreeBSD/DragonFly BSD. If you can provide links, that'll definitely accelerate the process. If it's not packaged, I hope you understand that it's not possible.

@dankamongmen
Copy link
Owner

https://packages.debian.org/unstable/librust-rustyline-dev
https://src.fedoraproject.org/rpms/rust-rustyline

that's debian and fedora, but i didn't see arch/alpine (didn't look long, though). pretty promising.

@dankamongmen
Copy link
Owner

so @alok one thing to consider is that libreadline needs some special support from Notcurses directmode in order to work properly. it's possible that rustyline doesn't, and can be used with directmode just fine by itself. have you tried this?

i didn't want to even embed readline support into notcurses, but otherwise you couldn't properly set it up.

@alok
Copy link
Author

alok commented Apr 20, 2021

I haven't, and likely won't be able to for a long time if ever =(. But I'll keep that in mind in case I ever do.

@dankamongmen dankamongmen added the nonfix closed without a successful fix (invalid, wontfix) label Apr 21, 2021
@dankamongmen dankamongmen self-assigned this Apr 21, 2021
@dankamongmen dankamongmen added this to the 2.3.0 milestone Apr 21, 2021
@dankamongmen
Copy link
Owner

I haven't, and likely won't be able to for a long time if ever =(. But I'll keep that in mind in case I ever do.

understood. i'm going to close this bug up as NOTFIX, and if anyone wants to use rustyline and runs into problems, i encourage them to reopen this or start a new one. for now, i'm assuming rustyline will work just fine with Notcurses. thanks for bringing it to my attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nonfix closed without a successful fix (invalid, wontfix) userquestion not quite bugs--inquiries from users
Projects
None yet
Development

No branches or pull requests

2 participants