|
From: | Chet Ramey |
Subject: | Re: bracketed paste ANSI sequence on non-ANSI terminals |
Date: | Fri, 3 Nov 2023 10:51:44 -0400 |
User-agent: | Mozilla Thunderbird |
On 11/2/23 2:18 PM, John Tsiombikas wrote:
I'm running bash with 5.2.15 which apparently uses readline 8.2, on debian sid. Since readline made enable-bracketed-paste default to on, I noticed garbage on some terminals, specifically pre-ANSI ones. It turns out readline spews the ANSI sequence ESC[?2004h to enable bracketed paste, regardless of the setting of TERM. I tested with TERM=vt52 and TERM=adm3a, and I'm still seeing that sequence on every line.
There's no portable way to determine whether a particular terminal supports bracketed paste. Readline does suppress it for dumb terminals, but the vt52 and adm3a are just smart enough to pass its tests. You can turn off bracketed paste in a startup file (bash or readline) depending on the value of TERM. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |