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

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

Pre-Script:  As others have said, this probably isn't a Zsh question.

On 9/13/23 2:48 AM, Sebastian Gniazdowski wrote:


Is there a way to somehow read screen-text

I'm not aware of one.

But my ignorance doesn't preclude it from existing.

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.

I'd suggest skimming / reading the XTerm Control Sequences page.

Link - ctlseqs(ms) - XTerm Control Sequences
 - https://www.invisible-island.net/xterm/ctlseqs/ctlseqs.html

N.B. the ctlseqs page is the most complete that I've found for XTerm -- which makes sense given the source. The only other thing beyond that is to delve into the manuals for various other terminals.

XTerm should implement everything on it's ctlseqs page.

I've found that most of the control sequences that XTerm and fancier DEC terminals support aren't even a glimmer in the eye of most terminal emulator programmers.

Finally, I find the idea of allowing programs to read existing text on the screen to be a potential security violation.

Grant. . . .
unix || die

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