[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: |
Pedro |
Subject: |
Re: [nearly offtopic] Feature that makes easy to locate to similar previous commands |
Date: |
Fri, 8 Mar 2013 03:20:02 +0100 |
On Fri, Mar 8, 2013 at 2:49 AM, Stephen Montgomery-Smith
<address@hidden> wrote:
> http://stackoverflow.com/questions/1030182/how-do-i-change-bash-history-completion-to-complete-whats-already-on-the-line
On Fri, Mar 8, 2013 at 3:09 AM, Jordi GutiƩrrez Hermoso
<address@hidden> wrote:
> 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 & @Stephen thanks for your help, that's what I was looking for.