repl: bind history prefix search to pg up/dn (#6377)
repl: simpler history file search code