1

How can I make up/down arrow in ubuntu's terminal scroll up and down only commands that begin with what I've already typed? for example, if I entered these commands:

% bla

% do this

% do that

and then, I enter bl[up arrow], I want it to show me "bla" and not "do that" first.

Thanks.

yoki
  • 1,796
  • 4
  • 16
  • 27

1 Answers1

1

Is this right?

# ~/.inputrc
"\e[A": beginning-of-history

Here is the table of escape sequece. And Cursor Up is on the top.

And there are some interesting commands.

Reference:

How do I change bash history completion to complete what's already on the line?

Community
  • 1
  • 1
EriCSN
  • 48
  • 6
  • 2
    The correct option was 'history-search-backward' but thanks for the links. – yoki Dec 28 '12 at 21:12
  • Is there a possibility to add a command after it? I want to to both do 'history-search-backward' and move to the end-of-line. How can I put two commands on a single line? – yoki Dec 28 '12 at 21:42