help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Bash history


From: Bharath Bhushan Lohray
Subject: Re: [Help-bash] Bash history
Date: Tue, 24 Mar 2015 09:49:34 -0700

:-)

Right. It does. I looked it up and the explanations I found was vague
making me believe that it just cycles through history in order.

Is it possible to bind it to a modifier? <shift>+<up> or similar?

Thank you.

On Tue, Mar 24, 2015 at 9:32 AM, Chris F.A. Johnson <address@hidden>
wrote:

> On Mon, 23 Mar 2015, Bharath Bhushan Lohray wrote:
>
>  I don't think this will do what I am trying to do. I am trying to
>> emulate MATLAB console like behaviour in bash. In MATLAB, using the
>> up arrow key when a few characters are typed, lets the user cycle
>> only through the commands that begin with those characters.
>>
>
>    That's exactly what it does do. Did you try it?
>
>
>
>> - Bharath
>>
>>
>> On Mon, Mar 23, 2015 at 12:28 PM, Chris F.A. Johnson <
>> address@hidden> wrote:
>>       On Mon, 23 Mar 2015, Bharath Bhushan Lohray wrote:
>>
>>             Hi,
>>
>>             I would like to modify the way bash retrieves history at the
>> command
>>             prompt. What source file do I find this part of the code?
>>
>>             I would like to restrict the history retrieval to only the
>> commands that
>>             begin with the letters at the prompt.
>>
>>             For example -
>>             $ l
>>             <up arrow>
>>             $ ls
>>             <up arrow>
>>             $ ls -alh
>>             <up arrow>
>>             $ ls -lh /var/log
>>
>>
>>       There's no need to play with the source code.
>>
>>       In ~/.inputrc:
>>
>>       "\e[A": history-search-backward  ## up-arrow
>>
>>       --
>>       Chris F.A. Johnson, <http://cfajohnson.com>
>>
>>
>>
>>
>>
> --
> Chris F.A. Johnson, <http://cfajohnson.com>
>


reply via email to

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