Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is there a way of getting current xterm buffer?
- X-seq: zsh-users 29245
- From: "A. Wik" <awik32@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Is there a way of getting current xterm buffer?
- Date: Wed, 13 Sep 2023 14:35:48 +0000
- Archived-at: <https://zsh.org/users/29245>
- In-reply-to: <CAN=4vMpYHeB0c3wkC_khMCHvrf0DrHHnzRtvYFXPoQkxtwkXew@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAKc7PVDmdYC+7k5gLTabqmm=iSQg0W7oMLN3R=Na4W=Qmaz-8w@mail.gmail.com> <CAN=4vMpYHeB0c3wkC_khMCHvrf0DrHHnzRtvYFXPoQkxtwkXew@mail.gmail.com>
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
memory.
-Albert.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author