help-octave
[Top][All Lists]
Advanced

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

Re: how to automatic reverse i search when pressing up arrow at prompt w


From: E. Joshua Rigler
Subject: Re: how to automatic reverse i search when pressing up arrow at prompt with text?
Date: Fri, 20 May 2005 10:35:14 -0600

Thanks for this suggestion, this is something I've wanted to know how to
do for years!

However, after an admittedly too brief examination of the readline man
page, and a little experimentation with the .inputrc file, I still can't
figure out how to make readline find a line in the command history that
has a matching string at ANY position, not just the beginning of the
command line (which is perfectly ML compatible, and as such, not as
useful as it could be).  Of course maybe this is best left as-is, and I
should simply continue to use Ctl-r for more advanced history searches.

Any suggestions?

-EJR


On Fri, 2005-05-20 at 08:17, Keith Goodman wrote:
> On 5/20/05, Ben Barrowes <address@hidden> wrote:
> > Is there any way to have octave automatically complete partially entered
> > commands at the prompt with prior commands without having to reverse i
> > search?
> 
> Yes. And it is already in 2.9.3.
> 
> To add it yourself to an earlier version (and to add it to your shell
> as well) just make an ~/.inputrc file that contains:
> 
> ## This file configures the behavior of line-input editing for all
> ## Octave users when Octave is configured to use GNU Readline library
> ## for input-line editing.
> 
> ## history-search-backward:
> ## 
> ##   Search backward through the history for the string of characters
> ##   between the start of the current line and the point.  This is a
> ##   non-incremental search.  Bound to "\e[A", the ANSI escape
> ##   sequence for the UP arrow.
> 
> "\e[A": history-search-backward
> 
> ## history-search-forward:
> ## 
> ##   Search forward through the history for the string of characters
> ##   between the start of the current line and the point.  This is a
> ##   non-incremental search.  Bound to "\e[B", the ANSI escape
> ##   sequence for the DOWN arrow.
> 
> "\e[B": history-search-forward
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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