Linux-friendly up and down keystrokes for substring history search