Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is there a way of getting current xterm buffer?

On Wed, 13 Sept 2023 at 09:16, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
> On Wed, Sep 13, 2023 at 9:48 AM Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> wrote:
> >
> > Hi,
> > I would like to implement a from-screen-words completion. For this,
> > I need the current screen text. People have already used tmux for
> > this, however I don't use it. Is there a way to somehow read
> > screen-text/ I've have had hopes for it when reading xtermctl and
> > promptnl (this function reads cursor position, so I've thought that
> > maybe it could read the character at given position…), but no
> > success at the end.
> In general, terminals don't have this capability. The only terminal I
> know that does is tmux. This isn't really a zsh question.
> Roman.

I think by looking into the termcap, terminfo, curses, and/or ncurses
libraries, you could find out about the capabilities of different
terminal types.  Note that I'm no expert on this, I come from a DOS
background, where you'd typically read/write directly to the video


Messages sorted by: Reverse Date, Date, Thread, Author