Improve command line history search