bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] key bindings proposal


From: Chet Ramey
Subject: Re: [Bug-readline] key bindings proposal
Date: Fri, 20 May 2016 08:38:27 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 5/19/16 11:34 PM, address@hidden wrote:
> Hi Chet,
> 
> Thanks for explaining your views.
> 
> Bash has a facility which I believe is based on binding a key to a
> string which is executed as if entered at the prompt, is that correct?
> Or were you referring to something else?

Yes, that's pretty much it.  You use the readline key binding syntax to
bind a string to a key sequence using a separate keymap.  Then you bind
that key sequence in the active keymap to a function that will look up
the string in the alternate keymap and execute it as if run by `eval'.
The READLINE_LINE and READLINE_POINT variables allow that command to
modify the line.  It's not a perfect fit to what readline could provide
`natively', but it's close.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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