Terminal on a notcurses plane #1831
Replies: 2 comments 28 replies
-
Hi there! You can take a look to these issues to see what's been discussed so far: I personally think this would be a very good addition to the library... |
Beta Was this translation helpful? Give feedback.
-
Time for an off topic ramble (as if most of this discussion was on topic) So I dug into the library and successfully used it. Created an nc_plane, put text in there and all was well. It seems to drop consistent portions of repeated ssh sessions, and it appears that VT spells present in the read buffer make That's one problem of ncplane_putvt() - it should be assumed that a user will just throw buffer contents right at it, and doing so may break escape sequences (or multi-byte characters). The way I see it, either a user will have to deal with that, or virtual terminal functionality should belong to a dedicated widget, that will store interrupted endings and concatenate them in front of subsequent inputs. Now from the user's perspective, I'm sorry to say that but the project would surely benefit from more verbose and organized manual. There's a book, which ought to be outdated pretty soon. There are some md files in doc/, which are empty aside of the basics, that says basically the same what the book says. There is USAGE.md which is the most helpful, but very hard to navigate. And finally one Wiki page which is an interesting read but doesn't say much about usage. |
Beta Was this translation helpful? Give feedback.
-
Hey there!
I've decided to implement a multi-server ssh client, something like clusterssh, but with TUI. I got a grasp on libssh, that's easy, but the problem of displaying a few terminals in a single terminal is far more complicated than I hoped.
As far as I know, there are only two programs on the face of Earth that catch and reinterpret escape codes of underlying processes, which are
screen
andtmux
. Both implement terminals within themselves, as far as I can tell.As I was reading htp-notcurses.pdf I stumbled upon a mention of
ncprocess
widget that was somehow meant to address this problem. Unfortunately, this widget has been mentioned only once, and even Google thinks no such thing exists.But anyway, notcurses is a WIP, and very promising indeed - so I think it would greatly benefit from a widget that emulates a terminal. If I'm about to implement such functionality anyway, could as well be a part of a library.
One way to achieve that is using libvterm, I believe, a library that parses escape codes and calls callbacks. Anyway, I'm not sure if you consider using an external library kosher.
So, to wrap this up, I wanted to ask what is the current state of affairs. Am I missing something that would ease my task, what happened to
ncprocess
, is a "terminal widget" a thing you'd like to see in this library?Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions