1

I'm used to using the unix shell where when I write the beginning of a command (say ca) and hit the up arrow, I will only get commands in history that begin with "ca". In my current shell (brand new ubuntu) when I hit the up arrow I always get the previous command... Also, here typing Ctrl-P doesn't move me to the previous word... How can I get the shell that does?

1
  • In bash, in default configuration, pressing Ctrl + p and then typingthe search keyword, and then using up or down arrow, does search in the history for commands containing the string you typed. It is more keypresses then you need, though. Jun 6, 2017 at 13:35

1 Answer 1

3

For the history-search enter this into your ~/.inputrc

"\M-[A":history-search-backward
"\M-[B":history-search-forward
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .