-
Notifications
You must be signed in to change notification settings - Fork 164
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
[Question] any plans to allow integration with TUI? #475
Comments
We currently focus our efforts on the regular scrollable "continuous paper in the teletype" mode of the terminal. There are some solid crates that support general line editing inside a tui component e.g. dialoguer (in conjunction with console) |
Thanks for the reply @sholderbach -- and from a priority standpoint, that makes sense. I'll take a look at these options (though, I would love something that could actually provide an editing experience very close to GNU readline). I also know that even if I did implement that in this repository, given priorities, I might be creating more work by obliging you to review and possibly support this in the near future. So I will see how this goes :). |
While most of the painting (including the terminal size related calculations are extracted into the |
Thanks for the insights. This weekend I may play around with As an aside, is there a features table of what has/hasn't been implemented compared to GNU readline? I think I'd be interested in bringing in any missing functionality too, in my spare time. |
That we don't have formally. Currently only our issues are indications on what to work on. |
Hi there, what's the feasibility of supporting an integration with a TUI framework like
tui-rs
? TUI frameworks generallywantassume full control of the terminal (likereedline
,tui-rs
usescrossterm
) so that it can draw boxes, capture mouse input, etc.It would be awesome to create TUIs where a pane (i.e., a positioned and size-constrained box) could have readline input capabilities. There don't seem to be any readline-like libraries that can do this right now, presumably because implementing readline requires some low-level control of the terminal which is at odds with allowing other library to assume that control.
Having not built this myself, all of this is just speculation: I think, for the most part, the capabilities needed to work well with TUI frameworks would be to allow the arbitrary positioning and sizing of the buffer (such that readline does not assume it starts at x:0, y:0 nor has the full terminal width) and allow another framework to capture/handle mouse events before passing through key events to
reedlne
.I hope I'm making at least some sense. If this enhancement could be aligned with the goals of reedline in some way, I'd be happy to help implement it (though I'm sure I'll need some time to ramp up since this is not my domain of expertise).
The text was updated successfully, but these errors were encountered: