help-octave
[Top][All Lists]
Advanced

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

Re: [nearly offtopic] Feature that makes easy to locate to similar previ


From: Jordi Gutiérrez Hermoso
Subject: Re: [nearly offtopic] Feature that makes easy to locate to similar previous commands
Date: Thu, 7 Mar 2013 21:09:44 -0500

On 7 March 2013 20:42, Pedro <address@hidden> wrote:
> Hi,
>
> Octave have a feature that when you put some commands, for example:
>
> version
> pkg list
> ls
>
> And if now you press "v" and later, the "up" arrow, you go to the
> first occurrence that start with "v", so this is "version" (more up
> arrow goes to more terms that start with "v").
> This is great.
>
> My question is if I can make this with simple bash commandline,
> editing something in .bashrc ?

Both Octave and bash are using GNU readline, a common library for
command line editing. Octave binds <up> to readline's
history-search-backwards command by default:

    
http://hg.savannah.gnu.org/hgweb/octave/file/caf4f386aaab/scripts/startup/inputrc

Just copy this file into your ~/.inputrc so that bash's readline also reads it.

- Jordi G. H.


reply via email to

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