On Tue, Aug 09, 2016 at 11:30:34AM +0200, Martin Natano wrote:
> On Mon, Aug 08, 2016 at 07:12:34PM +0200, Ingo Schwarze wrote:
> > 
> > According to the documentation, typing the escape key alone is not
> > a supported method of exiting the search prompt.  The ksh(1) manual
> > says:
> > 
> >     search-history: ^R
> >             Enter incremental search mode.  [...]
> >             The abort key will leave search mode.
> > 
> > Above, the term "abort key" is defined as follows:
> > 
> >     abort: ^C, ^G
> >             Useful as a response to a request for a search-history
> >             pattern in order to abort the search.
> > 
> > And indeed, Ctrl-C and Ctrl-G work as expected to abort search-history.
> 
> abort clears the line buffer, while esc does not.
> 
> 
> > 
> > The search-history description does not say anything that the escape
> > key could be used to leave search mode, nor do i see such a statement
> > anywhere else; instead, the search-history description goes on as
> > follows:

However, we explicitly *do* use escape to exit the search mode already,
regardless of whether said escape is part of an "other command" or not,
so we're not entirely true to the man page there either.

> 
> Yes right, somehow I was under the impression that this was the way to
> stop searching and edit the line before executing it. Although with the
> other commands now working correctly, this is not necessary anymore. :)
> 
> 
> > qualify as "other commands", and i don't see why it should matter
> > whether i type both bytes almost instantaneously or whether there
> > is a noticable delay between the two.
> 
> It doesn't matter if we don't try to bind the escape key.
> 
> 
> > For that reason, i prefer my version of the patch to yours, and in
> > addition to being arguably better, it is certainly much simpler.
> > That said, i don't strongly object to yours, i also consider it
> > better than the current situation.
> 
> Fair enough. Please go ahead with your patch. ok natano@

I concur. ok halex@.

> 
> 
> natano
> 

Reply via email to