Ask Your Question

bash reverse search (ctrl+r), going forward

asked 2012-04-19 05:08:31 -0500

shaiton gravatar image

updated 2012-04-19 05:10:45 -0500

Hi, I've never found how to loop on the other way while doing a reverse search on the bash history.

  1. Let's do [CTRL]+[R] enter text, [CTRL]+[R] again to search back on the history.
  2. Now assume that you went too fast, you want to go back (ie forward on the history) to the previous one. What is the shortcut for that?

I don't like starting the search again from the begining :)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-04-19 15:04:34 -0500

ztank1013 gravatar image

updated 2012-04-20 12:15:41 -0500

I found out this post that actually works to invert the i-reverse-search (intelligent reverse search) behavior.

First you may have to set this on the command line

stty -ixon

This is mainly because the ctrl + s keyboard shortcut freezes the terminal with some bash shells. Be aware that you can unfreeze your terminal using the ctrl + q combination if thit is the case.

Then you can use the

ctrl + s

combination after your reverse intelligent search has begun to start the intelligent search (i-search) forward.

edit flag offensive delete link more

answered 2012-04-19 23:21:17 -0500

Akshay gravatar image
edit flag offensive delete link more

Question Tools



Asked: 2012-04-19 05:08:31 -0500

Seen: 7,461 times

Last updated: Apr 20 '12