bug-readline
[Top][All Lists]
Advanced

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

Re: Readline-8.2-beta available


From: Per Bothner
Subject: Re: Readline-8.2-beta available
Date: Mon, 18 Apr 2022 14:32:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/18/22 13:27, Karl O. Pinc wrote:
The feature I was trying to implement would let newlines
take effect in pasted text with bracketed paste on.
This would not impair security.  Newlines are clearly part
of selected/copied text; it is no surprise when they
are pasted.  And becausee bracketed paste disables all other
readline commands, there is no "hidden manipulation"
of pasted text and so no opportunity for malicious actors.

Speaking for myself: Having a pasted newline be just inserted
rather than "take effect" is the correct default (and I'm
not convenced the "take effect immediately" behavior is
useful enough to warrant an option).

It is not just because of malicious actors but even more so accidents:
Unintentionally including an extra newline.  The downside if
you intended "take effect" is you have to type an extra Newline.
The downside the other way if you unintentionally add a final newline
is you get a command executed before you intended.  That can be a lot
harder to deal with, obviously.  The cost-benefit argument seems to
clearly favor the self-insert approach - unless you never make mistakes.

In other words: It's not that we don't understand what you're
asking for - it's that we (or at least I) think you're wrong.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

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