One knows that long commands can be retrieved by <C-r>. If the
search fails, one may cancel it by <C-g>. However, how can one
search forward through the command history instead of backword?
The answer is simple: add stty -ixon to your BASHRC.