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: Chet Ramey
Subject: Re: bracketed-paste-mode should default to "off"
Date: Fri, 25 Feb 2022 12:03:05 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0

On 2/25/22 9:42 AM, Per Bothner wrote:

What are harder problem is
(a) the reverse problem: copying to clipboard; and

This is fairly easy to accomplish if you have a command that copies text
supplied as an argument to the clipboard (like macOS's `pbcopy'). You can
run it from a shell function bound with `bind -x' and feed it whatever text
you like.

(b) co-oordinating with the X selection.

I'm not even sure how you would do this in a portable way, even if it were
X specific. I suppose if you could read the character positions
corresponding to the start and end of the selection you could translate
them into the readline point and mark. You could do that from a shell
function bound with `bind -x' as well.

A related problem is that one should be able move the readline cursor
by clicking with the mouse.  (The DomTerm terminal implements this by sending
left-arrow/right-arrow commands as needed, when emabled by certain escape sequences.)

This is appropriate functionality for a terminal emulator to provide, since
readline is window-system agnostic and doesn't have a way to read mouse
events.

--
``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/



reply via email to

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