bug-readline
[Top][All Lists]
Advanced

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

Re: bracketed-paste-mode should default to "off"


From: Per Bothner
Subject: Re: bracketed-paste-mode should default to "off"
Date: Fri, 4 Feb 2022 13:09:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

 2/4/22 11:21, Chet Ramey wrote:
On 2/3/22 4:09 PM, Per Bothner wrote:
By "active input area" I mean the text in the terminal that can be edited:
what gets sent to the application on Enter.  More precisely, the section
of the visible terminal corresponding to that text.  The area after the prompt,
and up to the last entered (or pasted) character.

Then you can essentially do that now, using $PROMPT_COMMAND and $PS0.

That might work but could be a bit fragile.  You'd want high-lighting
to be reset to normal mode whenever readline exits (error or normal),
not just before a command starts executing.

I just don't see any particular advantage to doing it.

The goal is to find a way to show that pasting has occurred
(and readline is awaiting more editing or an Enter)
without the disconcerting and ugly inverse video currently used.
If we have some way to highlight the input editing area,
I think that is a more elegant approach.

Alternatively, we can use some highlight mode for the *rest* of the input lines.
(I.e. the current input line(s) *except* prompt and editing area.)
The latter approach as the advantage that the default can be a neutral color
that works for both dark mode and light mode.

Either way, if the cursor is in a line with such highlighting,
it makes it clear readline is waiting for input.  Also, I think highlighting
input lines in a style distinct from output is useful in itself.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

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