bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] {forward,reverse}-search-history binding bug


From: Chet Ramey
Subject: Re: [Bug-readline] {forward,reverse}-search-history binding bug
Date: Mon, 13 Nov 2017 08:48:17 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/12/17 2:49 AM, Yuriy Ershov wrote:
> So.. Guys, this is really easy to reproduce.
> Can someone confirm this is a bug?
> Or else pease tell me how do I map a key sequence starting with ESC (which
> is essentially any sane key/combination) to the *-search-history command.

Here's the thing: the ESC, since it's part of the default value of the
`isearch-terminators' variable, ends the search and makes the last line
found the current line. All the work after that is to decide whether to
drop the ESC or to assume it's part of a multi-character key sequence and
use it. The search is already terminated.

If you want to try it, remove the ESC from the value of isearch-terminators
(just set it to only ^J) and see whether things work more to your liking.

I did a little bit of work post bash-4.4 to make isearch mode work better
with multi-character key sequences, but there may still be issues there.

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



reply via email to

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