bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bracketed paste ANSI sequence on non-ANSI terminals


From: John Tsiombikas
Subject: Re: bracketed paste ANSI sequence on non-ANSI terminals
Date: Mon, 6 Nov 2023 17:16:51 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Nov 06, 2023 at 08:57:28AM -0500, Chet Ramey wrote:
> On 11/4/23 4:35 AM, John Tsiombikas wrote:
> 
> >Detecting if a terminal is not ANSI-compatible and refraining from
> >transmitting any, such as the bracketed paste in question, could be done
> >at the very least by comparing termcap escape sequences for various
> >things, if there's no better way I'm not aware of.
> 
> Well, let's expand on these "various things." If you want to write up a
> patch that encapsulates your meaning, I'll take a look at it.

I will not submit a patch, but I can explain what I meant. For instance
if termcap says the sequence for homing the cursor is "ESC [ H" or the
8bit equivalent, then you're probably dealing with an ANSI-compatible
terminal, that will happily either take heed or correctly parse and
ignore your bracketed paste sequence.

As I said, there might be a more direct way that I'm not aware of, but
this sounds like a clear indication making it easy to classify terminals
into ANSI and non-ANSI.

Of course a more direct alternative, assuming there aren't going to be
any new non-ANSI terminals coming out in the future (which is a good
bet), is to just build a list of known non-ANSI terminals, but that's
more work, and you might still miss some.

-- 
John Tsiombikas
http://nuclear.mutantstargoat.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]