Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
When doing reverse intelligent search on a terminal (Ctrl+R), I can keep pressing Ctrl+R to go back in "history" and get older commands containing my search string.
How can I move back to a result which I have already displayed (a previous search result)?
I want to leave a reference for people who may find this, as the linked question actually asks for something else (even if one of the answers contains the solution to this problem).
The key binding to move forward is CTRLS.
The problem is that this binding, in many terminals, is used by default to send the pause transmission code (XOF
).
As in man stty
:
[-]ixon
enable XON/XOFF flow control
So, if you have this option enabled on your terminal (the output of stty -a
contains ixon
withouth the -
sign in front), you cannot use CTRLS in the context of reverse-i-search.
To disable it, use the following command:
stty -ixon
And CTRLS will give you a (i-search)
(non reverse).