prefix search will change your life.
# GNU readline .inputrc
# Brendan O'Connor (dotfiles.org/~brendano) (brenocon at gmail)
#
# Prefix search! Type "s" then press up -- only search through history that
# started with "s" -- e.g. "ssh", "source", etc.
#
# Since this is .inputrc, this is automatically turned on for many different
# programs: bash, irb, python, mysql, octave, etc etc. sweet.
#
# For any of these programs, if you configure history to persist across
# sessions, then this becomes a usage search feature. For example, I type "ss"
# then start pressing up to scroll through all machines I've ssh'd to in the
# last several months. (C-r reverse search can do this too, but for some
# reason prefix search feels much nicer.) If I can't remember how to type a
# specific command, I can just prefix search for its beginning, e.g. "ki"
# reveals "kill -9 %1".
#
# dotfiles.org/~brendano has bash, irb, and zsh configuration for persistent
# history.
# i cant believe this is not default
set blink-matching-paren on
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOA": history-search-backward
"\eOB": history-search-forward
# C-p and C-n still do normal history navigation, but to override:
#"\C-p": history-search-backward
#"\C-n": history-search-forward